单据添加部门

purchase
anthonyywj2 3 years ago
parent b1c8d95d61
commit dfe651487c

@ -163,6 +163,7 @@ public class StockOrderController {
StockOrderEntity stockOrderEntity = new StockOrderEntity(); StockOrderEntity stockOrderEntity = new StockOrderEntity();
BeanUtils.copyProperties(stockOrderPostRequest, stockOrderEntity); BeanUtils.copyProperties(stockOrderPostRequest, stockOrderEntity);
stockOrderEntity.setInvWarehouseCode(stockOrderPostRequest.getInvWarehouseCode()); stockOrderEntity.setInvWarehouseCode(stockOrderPostRequest.getInvWarehouseCode());
stockOrderEntity.setDept(stockOrderPostRequest.getDeptCode());
stockOrderEntity.setCreateUser(userId); stockOrderEntity.setCreateUser(userId);
stockOrderEntity.setStatus( stockOrderEntity.setStatus(
StringUtils.isBlank(stockOrderEntity.getStatus()) ? 501 + ""//未提交 StringUtils.isBlank(stockOrderEntity.getStatus()) ? 501 + ""//未提交

@ -48,4 +48,9 @@ public class StockOrderEntity {
private String billTypeName; private String billTypeName;
private String subInvName; private String subInvName;
private String invName; private String invName;
private String dept;
private String deptName;
} }

@ -27,6 +27,7 @@ public class StockOrderPostRequest {
private String customerId; private String customerId;
private String invWarehouseCode; private String invWarehouseCode;
private String locStorageCode; private String locStorageCode;
private String deptCode;
private BigDecimal price; private BigDecimal price;
private String unitIdFk; private String unitIdFk;
} }

@ -951,6 +951,7 @@ public class IoTransInoutService {
stockOrderEntity.setCorpName(orderEntity.getFromCorp()); stockOrderEntity.setCorpName(orderEntity.getFromCorp());
stockOrderEntity.setInvWarehouseCode(orderEntity.getInvWarehouseCode()); stockOrderEntity.setInvWarehouseCode(orderEntity.getInvWarehouseCode());
stockOrderEntity.setOrderIdFk(orderEntity.getId()); stockOrderEntity.setOrderIdFk(orderEntity.getId());
stockOrderEntity.setDept(orderEntity.getDeptCode());
stockOrderService.insertStockOrder(stockOrderEntity); stockOrderService.insertStockOrder(stockOrderEntity);
//删除关联的业务单据详情 //删除关联的业务单据详情

@ -1,9 +1,9 @@
# \u672C\u5730\u73AF\u5883 # \u672C\u5730\u73AF\u5883
server.port=9991 server.port=9991
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.66:3360/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1/udiwms?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=root spring.datasource.password=123456
#spring.datasource.password=89083fb2fc145533 #spring.datasource.password=89083fb2fc145533
server.servlet.context-path= server.servlet.context-path=
#logging.level.com.glxp.api.admin.dao=debug #logging.level.com.glxp.api.admin.dao=debug

@ -1,4 +1,4 @@
spring.profiles.active=test1 spring.profiles.active=dev
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

@ -30,7 +30,7 @@
thirdSysFk, status, statusInfo, type, sourceType, thirdSysFk, status, statusInfo, type, sourceType,
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk, printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk,
totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime, totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime,
updateTime, invWarehouseCode, fromSubInvCode) updateTime, invWarehouseCode, fromSubInvCode,dept)
values (#{id}, values (#{id},
#{billNo}, #{billNo},
#{billdate}, #{billdate},
@ -45,7 +45,7 @@
#{sourceType}, #{sourceType},
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice}, #{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice},
#{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime}, #{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime},
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode}) #{updateTime}, #{invWarehouseCode}, #{fromSubInvCode},#{dept})
</insert> </insert>
<update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity"> <update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
UPDATE stock_order UPDATE stock_order
@ -76,6 +76,7 @@
<if test="updateTime != null">updateTime=#{updateTime},</if> <if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if> <if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
<if test="fromSubInvCode != null">fromSubInvCode=#{fromSubInvCode},</if> <if test="fromSubInvCode != null">fromSubInvCode=#{fromSubInvCode},</if>
<if test="dept != null">dept=#{dept},</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -105,14 +106,14 @@
<select id="filterListOr" parameterType="com.glxp.api.admin.req.business.StockOrderFilterRequest" <select id="filterListOr" parameterType="com.glxp.api.admin.req.business.StockOrderFilterRequest"
resultType="com.glxp.api.admin.entity.business.StockOrderEntity"> resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name billTypeName,iws2.name fromSubInvName,auth_dept.name deptName FROM stock_order
billTypeName,iws2.name fromSubInvName FROM stock_order
left join basic_bustype_local on stock_order.billType = basic_bustype_local.action left join basic_bustype_local on stock_order.billType = basic_bustype_local.action
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code` LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code` LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code`
LEFT JOIN inv_warehouse_sub iws ON stock_order.invWarehouseCode = iws.`code` LEFT JOIN inv_warehouse_sub iws ON stock_order.invWarehouseCode = iws.`code`
LEFT JOIN inv_warehouse_sub iws2 ON stock_order.fromSubInvCode = iws2.`code` LEFT JOIN inv_warehouse_sub iws2 ON stock_order.fromSubInvCode = iws2.`code`
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code` LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
left join auth_dept on stock_order.dept =auth_dept.code
<where> <where>
<if test="id != '' and id!=null"> <if test="id != '' and id!=null">
and stock_order.id =#{id} and stock_order.id =#{id}
@ -188,7 +189,7 @@
(select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on (select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on
inv_bustype_user.scAction = basic_bussiness_type.action inv_bustype_user.scAction = basic_bussiness_type.action
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode} WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
GROUP BY inv_bustype_user.id) br GROUP BY inv_bustype_user.id)
</if> </if>
</if> </if>
<if test="createUser!=null"> <if test="createUser!=null">

Loading…
Cancel
Save