Compare commits
6 Commits
681462a70f
...
965c2a1359
Author | SHA1 | Date | |
---|---|---|---|
![]() |
965c2a1359 | ||
![]() |
ad19cfa00d | ||
![]() |
85a71ff6c1 | ||
![]() |
ea3648e9ca | ||
![]() |
5f4c002265 | ||
![]() |
0dc12973ad |
|
@ -163,7 +163,7 @@ public class Constants
|
||||||
/**
|
/**
|
||||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||||
*/
|
*/
|
||||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task" };
|
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task", "com.ruoyi.task" };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务违规的字符
|
* 定时任务违规的字符
|
||||||
|
|
|
@ -61,7 +61,9 @@ public class DataScopeUtil {
|
||||||
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
|
||||||
{
|
{
|
||||||
StringBuilder sqlString = getSqlString(currentUser, deptAlias, userAlias, PermissionContextHolder.getContext());
|
StringBuilder sqlString = getSqlString(currentUser, deptAlias, userAlias, PermissionContextHolder.getContext());
|
||||||
return getJoinSqlString(sqlString, "");
|
if (StringUtils.isNotBlank(sqlString.toString())) {
|
||||||
|
return getJoinSqlString(sqlString, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.ruoyi.task.prodOrder;
|
||||||
|
|
||||||
|
import com.ruoyi.common.constant.Constants;
|
||||||
|
import com.ruoyi.web.yh.prodOrder.domain.dto.ProdOrderSyncQuery;
|
||||||
|
import com.ruoyi.web.yh.prodOrder.domain.enums.ProdOrderErpStatus;
|
||||||
|
import com.ruoyi.web.yh.prodOrder.service.ProdOrderService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wjh
|
||||||
|
* 2024/11/21
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ProdOrderTask {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProdOrderService prodOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步生产订单
|
||||||
|
*/
|
||||||
|
public void sync() {
|
||||||
|
ProdOrderSyncQuery query = new ProdOrderSyncQuery();
|
||||||
|
query.setStatusList(ProdOrderErpStatus.canSync());
|
||||||
|
prodOrderService.sync(query, Constants.SYSTEM_USER_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -115,10 +115,15 @@ public class Price extends BaseEntity implements LogBizParam
|
||||||
@ApiModelProperty("禁用时间")
|
@ApiModelProperty("禁用时间")
|
||||||
private LocalDateTime disabledTime;
|
private LocalDateTime disabledTime;
|
||||||
|
|
||||||
@Excel(name = "生产数量(个)")
|
@Excel(name = "生产数量倍数分子(个)")
|
||||||
@ApiModelProperty("生产数量(个)")
|
@ApiModelProperty("生产数量倍数分子(个)")
|
||||||
@Min(value = 0, message = "生产数量不允许小于0个")
|
@Min(value = 0, message = "生产数量倍数分子不允许小于0")
|
||||||
private BigDecimal quantity;
|
private BigDecimal quantityNumerator;
|
||||||
|
|
||||||
|
@Excel(name = "生产数量倍数分母(个)")
|
||||||
|
@ApiModelProperty("生产数量倍数分母(个)")
|
||||||
|
@Min(value = 1, message = "生产数量倍数分母不允许小于1")
|
||||||
|
private BigDecimal quantityDenominator;
|
||||||
|
|
||||||
/** 创建者 */
|
/** 创建者 */
|
||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
|
|
|
@ -33,7 +33,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bp.update_by,
|
bp.update_by,
|
||||||
bp.disabled,
|
bp.disabled,
|
||||||
bp.disabled_time,
|
bp.disabled_time,
|
||||||
bp.quantity,
|
bp.quantity_numerator,
|
||||||
|
bp.quantity_denominator,
|
||||||
sd.dept_name as dept_name
|
sd.dept_name as dept_name
|
||||||
from bst_price bp
|
from bst_price bp
|
||||||
left join sys_dept sd on sd.dept_id = bp.dept_id
|
left join sys_dept sd on sd.dept_id = bp.dept_id
|
||||||
|
@ -113,7 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="disabled != null">disabled,</if>
|
<if test="disabled != null">disabled,</if>
|
||||||
<if test="disabledTime != null">disabled_time,</if>
|
<if test="disabledTime != null">disabled_time,</if>
|
||||||
<if test="quantity != null">quantity,</if>
|
<if test="quantityNumerator != null">quantity_numerator,</if>
|
||||||
|
<if test="quantityDenominator != null">quantity_denominator,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
@ -139,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="disabled != null">#{disabled},</if>
|
<if test="disabled != null">#{disabled},</if>
|
||||||
<if test="disabledTime != null">#{disabledTime},</if>
|
<if test="disabledTime != null">#{disabledTime},</if>
|
||||||
<if test="quantity != null">#{quantity},</if>
|
<if test="quantityNumerator != null">#{quantityNumerator},</if>
|
||||||
|
<if test="quantityDenominator != null">#{quantityDenominator},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -185,7 +188,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="data.updateBy != null">bp.update_by = #{data.updateBy},</if>
|
<if test="data.updateBy != null">bp.update_by = #{data.updateBy},</if>
|
||||||
<if test="data.disabled != null">bp.disabled = #{data.disabled},</if>
|
<if test="data.disabled != null">bp.disabled = #{data.disabled},</if>
|
||||||
<if test="data.disabledTime != null">bp.disabled_time = #{data.disabledTime},</if>
|
<if test="data.disabledTime != null">bp.disabled_time = #{data.disabledTime},</if>
|
||||||
<if test="data.quantity != null">bp.quantity = #{data.quantity},</if>
|
<if test="data.quantityNumerator != null">quantity_numerator = #{data.quantityNumerator},</if>
|
||||||
|
<if test="data.quantityDenominator != null">quantity_denominator = #{data.quantityDenominator},</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<delete id="deletePriceByPriceId" parameterType="Long">
|
<delete id="deletePriceByPriceId" parameterType="Long">
|
||||||
|
|
|
@ -39,7 +39,8 @@ public class PriceConverterImpl implements PriceConverter {
|
||||||
po.setUnit(data.getUnit());
|
po.setUnit(data.getUnit());
|
||||||
po.setClassify(data.getClassify());
|
po.setClassify(data.getClassify());
|
||||||
po.setCreateId(loginUser.getUserId());
|
po.setCreateId(loginUser.getUserId());
|
||||||
po.setQuantity(data.getQuantity());
|
po.setQuantityDenominator(data.getQuantityDenominator());
|
||||||
|
po.setQuantityNumerator(data.getQuantityNumerator());
|
||||||
po.setCreateBy(loginUser.getNickName());
|
po.setCreateBy(loginUser.getNickName());
|
||||||
po.setRemark(data.getRemark());
|
po.setRemark(data.getRemark());
|
||||||
return po;
|
return po;
|
||||||
|
@ -65,7 +66,8 @@ public class PriceConverterImpl implements PriceConverter {
|
||||||
po.setPrice(data.getPrice());
|
po.setPrice(data.getPrice());
|
||||||
po.setUnit(data.getUnit());
|
po.setUnit(data.getUnit());
|
||||||
po.setClassify(data.getClassify());
|
po.setClassify(data.getClassify());
|
||||||
po.setQuantity(data.getQuantity());
|
po.setQuantityDenominator(data.getQuantityDenominator());
|
||||||
|
po.setQuantityNumerator(data.getQuantityNumerator());
|
||||||
po.setUpdateId(loginUser.getUserId());
|
po.setUpdateId(loginUser.getUserId());
|
||||||
po.setUpdateBy(loginUser.getNickName());
|
po.setUpdateBy(loginUser.getNickName());
|
||||||
po.setRemark(data.getRemark());
|
po.setRemark(data.getRemark());
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class ProdOrderController extends BaseController
|
||||||
return toAjax(prodOrderService.deleteProdOrderByIds(ids));
|
return toAjax(prodOrderService.deleteProdOrderByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('yh:productOrder:sync')")
|
@PreAuthorize("@ss.hasPermi('yh:prodOrder:sync')")
|
||||||
@Log(title = LogTitle.PROD_ORDER, businessType = BusinessType.SYNC, bizType = LogBizType.PROD_ORDER)
|
@Log(title = LogTitle.PROD_ORDER, businessType = BusinessType.SYNC, bizType = LogBizType.PROD_ORDER)
|
||||||
@PutMapping("/sync")
|
@PutMapping("/sync")
|
||||||
public AjaxResult sync(@RequestBody ProdOrderSyncQuery query) {
|
public AjaxResult sync(@RequestBody ProdOrderSyncQuery query) {
|
||||||
|
|
|
@ -27,4 +27,16 @@ public class ProdOrderQuery extends ProdOrderVO {
|
||||||
@ApiModelProperty("ERP业务状态列表")
|
@ApiModelProperty("ERP业务状态列表")
|
||||||
private List<String> erpStatusList;
|
private List<String> erpStatusList;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料规格品类")
|
||||||
|
private String materialCategory;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料大小")
|
||||||
|
private String materialSize;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料表面处理")
|
||||||
|
private String materialSurface;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料盖子")
|
||||||
|
private String materialCover;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,18 @@
|
||||||
<if test="query.deptId != null "> and sd.dept_id = #{query.deptId}</if>
|
<if test="query.deptId != null "> and sd.dept_id = #{query.deptId}</if>
|
||||||
<if test="query.erpMaterialId != null and query.erpMaterialId != ''"> and bpo.erp_material_id = #{query.erpMaterialId}</if>
|
<if test="query.erpMaterialId != null and query.erpMaterialId != ''"> and bpo.erp_material_id = #{query.erpMaterialId}</if>
|
||||||
<if test="query.erpBaseUnitId != null and query.erpBaseUnitId != ''"> and erp_base_unit_id = #{query.erpBaseUnitId}</if>
|
<if test="query.erpBaseUnitId != null and query.erpBaseUnitId != ''"> and erp_base_unit_id = #{query.erpBaseUnitId}</if>
|
||||||
|
<if test="query.materialCategory != null and query.materialCategory != ''">
|
||||||
|
and bm.category = #{query.materialCategory}
|
||||||
|
</if>
|
||||||
|
<if test="query.materialSize != null and query.materialSize != ''">
|
||||||
|
and bm.size = #{query.materialSize}
|
||||||
|
</if>
|
||||||
|
<if test="query.materialSurface != null and query.materialSurface != ''">
|
||||||
|
and bm.surface = #{query.materialSurface}
|
||||||
|
</if>
|
||||||
|
<if test="query.materialCover != null and query.materialCover != ''">
|
||||||
|
and bm.cover = #{query.materialCover}
|
||||||
|
</if>
|
||||||
<if test="query.erpStatusList != null and query.erpStatusList.size() > 0">
|
<if test="query.erpStatusList != null and query.erpStatusList.size() > 0">
|
||||||
and bpo.erp_status in
|
and bpo.erp_status in
|
||||||
<foreach collection="query.erpStatusList" item="item" open="(" close=")" separator=",">
|
<foreach collection="query.erpStatusList" item="item" open="(" close=")" separator=",">
|
||||||
|
|
|
@ -352,7 +352,8 @@ public class ReportServiceImpl implements ReportService
|
||||||
}
|
}
|
||||||
ServiceUtil.assertion(orderProd.getOrderId() == null
|
ServiceUtil.assertion(orderProd.getOrderId() == null
|
||||||
|| orderProd.getNum() == null
|
|| orderProd.getNum() == null
|
||||||
|| orderProd.getPriceQuantity() == null,
|
|| orderProd.getPriceQuantityNumerator() == null
|
||||||
|
|| orderProd.getPriceQuantityDenominator() == null,
|
||||||
"修改订单审核数量出错:参数错误"
|
"修改订单审核数量出错:参数错误"
|
||||||
);
|
);
|
||||||
BigDecimal baseNum = ReportUtils.calcOrderProdBaseNum(orderProd);
|
BigDecimal baseNum = ReportUtils.calcOrderProdBaseNum(orderProd);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.web.yh.report.utils;
|
||||||
import com.ruoyi.web.yh.reportOrderProd.domain.ReportOrderProdVO;
|
import com.ruoyi.web.yh.reportOrderProd.domain.ReportOrderProdVO;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wjh
|
* @author wjh
|
||||||
|
@ -15,10 +16,10 @@ public class ReportUtils {
|
||||||
* 计算报表订单产量的基础数量
|
* 计算报表订单产量的基础数量
|
||||||
*/
|
*/
|
||||||
public static BigDecimal calcOrderProdBaseNum(ReportOrderProdVO vo) {
|
public static BigDecimal calcOrderProdBaseNum(ReportOrderProdVO vo) {
|
||||||
if (vo == null || vo.getPriceQuantity() == null || vo.getNum() == null) {
|
if (vo == null || vo.getPriceQuantityNumerator() == null || vo.getPriceQuantityDenominator() == null || vo.getNum() == null) {
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
return vo.getPriceQuantity().multiply(vo.getNum());
|
return vo.getPriceQuantityNumerator().multiply(vo.getNum()).divide(vo.getPriceQuantityDenominator(), 2, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,8 +49,11 @@ public class ReportOrderProdVO extends ReportOrderProd {
|
||||||
@ApiModelProperty("订单已审核通过的基础产量")
|
@ApiModelProperty("订单已审核通过的基础产量")
|
||||||
private BigDecimal verifiedBaseNum;
|
private BigDecimal verifiedBaseNum;
|
||||||
|
|
||||||
@ApiModelProperty("工序倍数")
|
@ApiModelProperty("工序倍数分子")
|
||||||
private BigDecimal priceQuantity;
|
private BigDecimal priceQuantityNumerator;
|
||||||
|
|
||||||
|
@ApiModelProperty("工序倍数分母")
|
||||||
|
private BigDecimal priceQuantityDenominator;
|
||||||
|
|
||||||
@ApiModelProperty("工序单位")
|
@ApiModelProperty("工序单位")
|
||||||
private String priceUnit;
|
private String priceUnit;
|
||||||
|
|
|
@ -14,7 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
brop.num,
|
brop.num,
|
||||||
brop.deleted,
|
brop.deleted,
|
||||||
brp.report_id as report_id,
|
brp.report_id as report_id,
|
||||||
brp.price_quantity as price_quantity,
|
brp.price_quantity_numerator as price_quantity_numerator,
|
||||||
|
brp.price_quantity_denominator as price_quantity_denominator,
|
||||||
brp.price_unit as price_unit,
|
brp.price_unit as price_unit,
|
||||||
brp.price_name as price_name,
|
brp.price_name as price_name,
|
||||||
brp.price_price as price_price,
|
brp.price_price as price_price,
|
||||||
|
@ -44,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="query.deleted == null "> and brop.deleted = false</if>
|
<if test="query.deleted == null "> and brop.deleted = false</if>
|
||||||
<if test="query.deleted != null "> and brop.deleted = #{query.deleted}</if>
|
<if test="query.deleted != null "> and brop.deleted = #{query.deleted}</if>
|
||||||
<if test="query.reportStatus != null "> and br.status = #{query.reportStatus}</if>
|
<if test="query.reportStatus != null "> and br.status = #{query.reportStatus}</if>
|
||||||
|
<if test="query.orderErpBillNo != null and query.orderErpBillNo != '' "> and bpo.erp_bill_no like concat('%', #{query.orderErpBillNo}, '%')</if>
|
||||||
<if test="query.reportProdIds != null and query.reportProdIds.size() > 0">
|
<if test="query.reportProdIds != null and query.reportProdIds.size() > 0">
|
||||||
and brop.report_prod_id in
|
and brop.report_prod_id in
|
||||||
<foreach collection="query.reportProdIds" item="item" open="(" separator="," close=")">
|
<foreach collection="query.reportProdIds" item="item" open="(" separator="," close=")">
|
||||||
|
@ -76,7 +78,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<select id="selectSumOfBaseNumGroupByOrderId" resultMap="ReportOrderProdSumOfBaseNumGroupByOrderIdVO">
|
<select id="selectSumOfBaseNumGroupByOrderId" resultMap="ReportOrderProdSumOfBaseNumGroupByOrderIdVO">
|
||||||
select
|
select
|
||||||
sum(brop.num * if(brp.price_quantity is null, 1, brp.price_quantity)) as `sum`,
|
sum(brop.num * if(
|
||||||
|
brp.price_quantity_numerator is null or brp.price_quantity_denominator is null,
|
||||||
|
1,
|
||||||
|
brp.price_quantity_numerator / brp.price_quantity_denominator
|
||||||
|
)) as `sum`,
|
||||||
order_id
|
order_id
|
||||||
from bst_report_order_prod brop
|
from bst_report_order_prod brop
|
||||||
left join bst_report_prod brp on brp.id = brop.report_prod_id
|
left join bst_report_prod brp on brp.id = brop.report_prod_id
|
||||||
|
|
|
@ -86,9 +86,13 @@ public class ReportProd extends BaseEntity
|
||||||
@ApiModelProperty("工序分类")
|
@ApiModelProperty("工序分类")
|
||||||
private String priceClassify;
|
private String priceClassify;
|
||||||
|
|
||||||
@Excel(name = "工序生产数量倍数(个)")
|
@Excel(name = "工序生产数量倍数分子(个)")
|
||||||
@ApiModelProperty("工序生产数量倍数(个)")
|
@ApiModelProperty("工序生产数量倍数分子(个)")
|
||||||
private BigDecimal priceQuantity;
|
private BigDecimal priceQuantityNumerator;
|
||||||
|
|
||||||
|
@Excel(name = "工序生产数量倍数分母(个)")
|
||||||
|
@ApiModelProperty("工序生产数量倍数分母(个)")
|
||||||
|
private BigDecimal priceQuantityDenominator;
|
||||||
|
|
||||||
@Excel(name = "工序类型")
|
@Excel(name = "工序类型")
|
||||||
@ApiModelProperty("工序类型")
|
@ApiModelProperty("工序类型")
|
||||||
|
|
|
@ -22,7 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
brp.price_price,
|
brp.price_price,
|
||||||
brp.price_unit,
|
brp.price_unit,
|
||||||
brp.price_classify,
|
brp.price_classify,
|
||||||
brp.price_quantity,
|
brp.price_quantity_numerator,
|
||||||
|
brp.price_quantity_denominator,
|
||||||
brp.deleted,
|
brp.deleted,
|
||||||
brp.price_type,
|
brp.price_type,
|
||||||
brp.remark
|
brp.remark
|
||||||
|
@ -81,7 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="pricePrice != null">price_price,</if>
|
<if test="pricePrice != null">price_price,</if>
|
||||||
<if test="priceUnit != null">price_unit,</if>
|
<if test="priceUnit != null">price_unit,</if>
|
||||||
<if test="priceClassify != null">price_classify,</if>
|
<if test="priceClassify != null">price_classify,</if>
|
||||||
<if test="priceQuantity != null">price_quantity,</if>
|
<if test="priceQuantityNumerator != null">price_quantity_numerator,</if>
|
||||||
|
<if test="priceQuantityDenominator != null">price_quantity_denominator,</if>
|
||||||
<if test="priceType != null and priceType != ''">price_type,</if>
|
<if test="priceType != null and priceType != ''">price_type,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -99,7 +101,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="pricePrice != null">#{pricePrice},</if>
|
<if test="pricePrice != null">#{pricePrice},</if>
|
||||||
<if test="priceUnit != null">#{priceUnit},</if>
|
<if test="priceUnit != null">#{priceUnit},</if>
|
||||||
<if test="priceClassify != null">#{priceClassify},</if>
|
<if test="priceClassify != null">#{priceClassify},</if>
|
||||||
<if test="priceQuantity != null">#{priceQuantity},</if>
|
<if test="priceQuantityNumerator != null">#{priceQuantityNumerator},</if>
|
||||||
|
<if test="priceQuantityDenominator != null">#{priceQuantityDenominator},</if>
|
||||||
<if test="priceType != null and priceType != ''">#{priceType},</if>
|
<if test="priceType != null and priceType != ''">#{priceType},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
|
@ -120,7 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
price_price,
|
price_price,
|
||||||
price_unit,
|
price_unit,
|
||||||
price_classify,
|
price_classify,
|
||||||
price_quantity,
|
price_quantity_numerator,
|
||||||
|
price_quantity_denominator,
|
||||||
price_type,
|
price_type,
|
||||||
remark
|
remark
|
||||||
)
|
)
|
||||||
|
@ -153,8 +157,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="i.priceUnit == null">default,</if>
|
<if test="i.priceUnit == null">default,</if>
|
||||||
<if test="i.priceClassify != null">#{i.priceClassify},</if>
|
<if test="i.priceClassify != null">#{i.priceClassify},</if>
|
||||||
<if test="i.priceClassify == null">default,</if>
|
<if test="i.priceClassify == null">default,</if>
|
||||||
<if test="i.priceQuantity != null">#{i.priceQuantity},</if>
|
<if test="i.priceQuantityNumerator != null">#{i.priceQuantityNumerator},</if>
|
||||||
<if test="i.priceQuantity == null">default,</if>
|
<if test="i.priceQuantityNumerator == null">default,</if>
|
||||||
|
<if test="i.priceQuantityDenominator != null">#{i.priceQuantityDenominator},</if>
|
||||||
|
<if test="i.priceQuantityDenominator == null">default,</if>
|
||||||
<if test="i.priceType != null">#{i.priceType},</if>
|
<if test="i.priceType != null">#{i.priceType},</if>
|
||||||
<if test="i.priceType == null">default,</if>
|
<if test="i.priceType == null">default,</if>
|
||||||
<if test="i.remark != null">#{i.remark},</if>
|
<if test="i.remark != null">#{i.remark},</if>
|
||||||
|
@ -185,7 +191,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="data.pricePrice != null">price_price = #{data.pricePrice},</if>
|
<if test="data.pricePrice != null">price_price = #{data.pricePrice},</if>
|
||||||
<if test="data.priceUnit != null">price_unit = #{data.priceUnit},</if>
|
<if test="data.priceUnit != null">price_unit = #{data.priceUnit},</if>
|
||||||
<if test="data.priceClassify != null">price_classify = #{data.priceClassify},</if>
|
<if test="data.priceClassify != null">price_classify = #{data.priceClassify},</if>
|
||||||
<if test="data.priceQuantity != null">price_quantity = #{data.priceQuantity},</if>
|
<if test="data.priceQuantityNumerator != null">price_quantity_numerator = #{data.priceQuantityNumerator},</if>
|
||||||
|
<if test="data.priceQuantityDenominator != null">price_quantity_denominator = #{data.priceQuantityDenominator},</if>
|
||||||
<if test="data.priceType != null and data.priceType != ''">price_type = #{data.priceType},</if>
|
<if test="data.priceType != null and data.priceType != ''">price_type = #{data.priceType},</if>
|
||||||
<if test="data.remark != null and data.remark != ''">remark = #{data.remark},</if>
|
<if test="data.remark != null and data.remark != ''">remark = #{data.remark},</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
@ -313,13 +320,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</foreach>
|
</foreach>
|
||||||
<foreach open="price_quantity = CASE id" collection="list" item="item" close="END,">
|
<foreach open="price_quantity_numerator = CASE id" collection="list" item="item" close="END,">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="item.priceQuantity != null">
|
<when test="item.priceQuantityNumerator != null">
|
||||||
WHEN #{item.id} THEN #{item.priceQuantity}
|
WHEN #{item.id} THEN #{item.priceQuantityNumerator}
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
WHEN #{item.id} THEN `price_quantity`
|
WHEN #{item.id} THEN `price_quantity_numerator`
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
<foreach open="price_quantity_denominator = CASE id" collection="list" item="item" close="END,">
|
||||||
|
<choose>
|
||||||
|
<when test="item.priceQuantityDenominator != null">
|
||||||
|
WHEN #{item.id} THEN #{item.priceQuantityDenominator}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
WHEN #{item.id} THEN `price_quantity_denominator`
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
@ -47,7 +47,8 @@ public class ReportProdConverterImpl implements ReportProdConverter {
|
||||||
bo.setPricePrice(vo.getPricePrice());
|
bo.setPricePrice(vo.getPricePrice());
|
||||||
bo.setPriceUnit(vo.getPriceUnit());
|
bo.setPriceUnit(vo.getPriceUnit());
|
||||||
bo.setPriceClassify(vo.getPriceClassify());
|
bo.setPriceClassify(vo.getPriceClassify());
|
||||||
bo.setPriceQuantity(vo.getPriceQuantity());
|
bo.setPriceQuantityDenominator(vo.getPriceQuantityDenominator());
|
||||||
|
bo.setPriceQuantityNumerator(vo.getPriceQuantityNumerator());
|
||||||
bo.setPriceType(vo.getPriceType());
|
bo.setPriceType(vo.getPriceType());
|
||||||
bo.setRemark(vo.getRemark());
|
bo.setRemark(vo.getRemark());
|
||||||
|
|
||||||
|
@ -94,7 +95,8 @@ public class ReportProdConverterImpl implements ReportProdConverter {
|
||||||
bo.setPricePrice(vo.getPricePrice());
|
bo.setPricePrice(vo.getPricePrice());
|
||||||
bo.setPriceUnit(vo.getPriceUnit());
|
bo.setPriceUnit(vo.getPriceUnit());
|
||||||
bo.setPriceClassify(vo.getPriceClassify());
|
bo.setPriceClassify(vo.getPriceClassify());
|
||||||
bo.setPriceQuantity(vo.getPriceQuantity());
|
bo.setPriceQuantityDenominator(vo.getPriceQuantityDenominator());
|
||||||
|
bo.setPriceQuantityNumerator(vo.getPriceQuantityNumerator());
|
||||||
bo.setPriceType(vo.getPriceType());
|
bo.setPriceType(vo.getPriceType());
|
||||||
bo.setRemark(vo.getRemark());
|
bo.setRemark(vo.getRemark());
|
||||||
|
|
||||||
|
|
23
ruoyi-web/src/main/resources/application-dev.yml
Normal file
23
ruoyi-web/src/main/resources/application-dev.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
spring:
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 6
|
||||||
|
# 密码
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
61
ruoyi-web/src/main/resources/application-druid-prod.yml
Normal file
61
ruoyi-web/src/main/resources/application-druid-prod.yml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://8.140.225.147:3306/yh-prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: e1069bd8d7daff94
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# 初始连接数
|
||||||
|
initialSize: 5
|
||||||
|
# 最小连接池数量
|
||||||
|
minIdle: 10
|
||||||
|
# 最大连接池数量
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置连接超时时间
|
||||||
|
connectTimeout: 30000
|
||||||
|
# 配置网络超时时间
|
||||||
|
socketTimeout: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
|
maxEvictableIdleTimeMillis: 900000
|
||||||
|
# 配置检测连接是否有效
|
||||||
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
|
statViewServlet:
|
||||||
|
enabled: true
|
||||||
|
# 设置白名单,不填则允许所有访问
|
||||||
|
allow:
|
||||||
|
url-pattern: /druid/*
|
||||||
|
# 控制台管理用户名和密码
|
||||||
|
login-username: ruoyi
|
||||||
|
login-password: 123456
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
# 慢SQL记录
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
23
ruoyi-web/src/main/resources/application-prod.yml
Normal file
23
ruoyi-web/src/main/resources/application-prod.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
spring:
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 6
|
||||||
|
# 密码
|
||||||
|
password: YgUIGNudqOQaRxHZ
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
|
@ -52,7 +52,9 @@ spring:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active:
|
||||||
|
- dev
|
||||||
|
- druid-prod
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
@ -65,28 +67,6 @@ spring:
|
||||||
restart:
|
restart:
|
||||||
# 热部署开关
|
# 热部署开关
|
||||||
enabled: true
|
enabled: true
|
||||||
# redis 配置
|
|
||||||
redis:
|
|
||||||
# 地址
|
|
||||||
host: localhost
|
|
||||||
# 端口,默认为6379
|
|
||||||
port: 6379
|
|
||||||
# 数据库索引
|
|
||||||
database: 6
|
|
||||||
# 密码
|
|
||||||
password:
|
|
||||||
# 连接超时时间
|
|
||||||
timeout: 10s
|
|
||||||
lettuce:
|
|
||||||
pool:
|
|
||||||
# 连接池中的最小空闲连接
|
|
||||||
min-idle: 0
|
|
||||||
# 连接池中的最大空闲连接
|
|
||||||
max-idle: 8
|
|
||||||
# 连接池的最大数据库连接数
|
|
||||||
max-active: 8
|
|
||||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
|
||||||
max-wait: -1ms
|
|
||||||
|
|
||||||
# token配置
|
# token配置
|
||||||
token:
|
token:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user