Merge remote-tracking branch 'origin/dev' into dev

pro
wj 2 years ago
commit aeedcdd984

@ -614,8 +614,8 @@ public class IoOrderDetailBizController extends BaseController {
orderEntity.setUpdateTime(new Date()); orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity); orderService.update(orderEntity);
} }
ioOrderDetailBizEntity.setCheckFileName(ioOrderDetailBizEntity.getFilePath()); ioOrderDetailBizEntity.setCheckFileName(ioOrderDetailBizEntity.getCheckFileName());
ioOrderDetailBizEntity.setCheckColdFileName(ioOrderDetailBizEntity.getColdFilePath()); ioOrderDetailBizEntity.setCheckColdFileName(ioOrderDetailBizEntity.getCheckColdFileName());
boolean b = orderDetailBizService.updateOrderDetailBiz(ioOrderDetailBizEntity); boolean b = orderDetailBizService.updateOrderDetailBiz(ioOrderDetailBizEntity);
return ResultVOUtils.success("修改成功!"); return ResultVOUtils.success("修改成功!");
} }

@ -147,16 +147,16 @@ public class InvProductController extends BaseController {
} }
//根据单据日期排序 //根据单据日期排序
list.sort((o1, o2) -> { // list.sort((o1, o2) -> {
long o1OrderTime = DateUtil.parseDate(o1.getOrderTime()).getTime(); // long o1OrderTime = DateUtil.parseDate(o1.getOrderTime()).getTime();
long o2OrderTime = DateUtil.parseDate(o2.getOrderTime()).getTime(); // long o2OrderTime = DateUtil.parseDate(o2.getOrderTime()).getTime();
if (o1OrderTime > o2OrderTime) { // if (o1OrderTime > o2OrderTime) {
return 1; // return 1;
} else if (o1OrderTime < o2OrderTime) { // } else if (o1OrderTime < o2OrderTime) {
return -1; // return -1;
} // }
return 0; // return 0;
}); // });
PageSimpleResponse<InvProductDetailResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<InvProductDetailResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal()); pageSimpleResponse.setTotal(pageInfo.getTotal());

@ -204,11 +204,12 @@ public class PurOrderController {
ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh()); ioOrderDetailBizEntity.setCertCode(basicProductsEntity.getZczbhhzbapzbh());
ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc()); ioOrderDetailBizEntity.setYlqxzcrbarmc(basicProductsEntity.getYlqxzcrbarmc());
ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory()); ioOrderDetailBizEntity.setManufacturer(basicProductsEntity.getManufactory());
ioOrderDetailBizEntity.setPrice(obj.getPrice());
ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname()); ioOrderDetailBizEntity.setMeasname(basicProductsEntity.getMeasname());
ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh()); ioOrderDetailBizEntity.setSpec(basicProductsEntity.getGgxh());
if (basicProductsEntity.getPrice() != null) { // if (basicProductsEntity.getPrice() != null) {
ioOrderDetailBizEntity.setPrice(BigDecimal.valueOf(basicProductsEntity.getPrice())); // ioOrderDetailBizEntity.setPrice(BigDecimal.valueOf(basicProductsEntity.getPrice()));
} // }
ioOrderDetailBizEntity.setSupId(obj.getSupId()); ioOrderDetailBizEntity.setSupId(obj.getSupId());
ioOrderDetailBizService.insert(ioOrderDetailBizEntity); ioOrderDetailBizService.insert(ioOrderDetailBizEntity);
} }
@ -299,11 +300,6 @@ public class PurOrderController {
} }
public void genOrder() {
}
/** /**
* *
*/ */

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
@Data @Data
@TableName(value = "pur_order_detail") @TableName(value = "pur_order_detail")
public class PurOrderDetailEntity { public class PurOrderDetailEntity {
@ -48,6 +50,10 @@ public class PurOrderDetailEntity {
@TableField(value = "zczbhhzbapzbh") @TableField(value = "zczbhhzbapzbh")
private String zczbhhzbapzbh; private String zczbhhzbapzbh;
@TableField(value = "price")
private BigDecimal price;
public static final String COL_ID = "id"; public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk"; public static final String COL_ORDERIDFK = "orderIdFk";

@ -241,7 +241,6 @@ public class IoOrderResponse {
private BigDecimal allAmount; private BigDecimal allAmount;
/** /**
* *
*/ */
@ -256,10 +255,11 @@ public class IoOrderResponse {
public String getFromName() { public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName))
return fromCorpName;
if (StrUtil.isNotEmpty(fromInvName)) if (StrUtil.isNotEmpty(fromInvName))
return fromInvName; return fromInvName;
if (StrUtil.isNotEmpty(fromCorpName))
return fromCorpName;
return fromName; return fromName;
} }
} }

@ -48,4 +48,7 @@ public class PurOrderDetailResponse {
private String supId; private String supId;
private String supName; private String supName;
private String billNo;
private String nameCode;
} }

@ -257,6 +257,17 @@ public class IoChangeInoutService {
codeTempEntities.add(codeTempEntity); codeTempEntities.add(codeTempEntity);
} }
codeTempService.insertBatch(codeTempEntities); codeTempService.insertBatch(codeTempEntities);
// 生成业务单
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(orderEntity.getBillNo());
if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities) {
orderDetailBizEntity.setOrderIdFk(outOrder.getBillNo());
orderDetailBizEntity.setId(IdUtil.getSnowflakeNextId());
orderDetailBizService.insert(orderDetailBizEntity);
}
}
if (isGenInovice) { if (isGenInovice) {
//生成发票信息 //生成发票信息
List<IoOrderInvoiceEntity> invoiceEntities = ioOrderInvoiceService.findByBillNo(orderEntity.getBillNo()); List<IoOrderInvoiceEntity> invoiceEntities = ioOrderInvoiceService.findByBillNo(orderEntity.getBillNo());

@ -290,8 +290,10 @@ public class IoCheckInoutService {
orderService.update(orderEntity); orderService.update(orderEntity);
return; return;
} }
if (orderEntity.getFromType() != ConstantStatus.FROM_COPY
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo()); && orderEntity.getFromType() != ConstantStatus.FROM_CHANGE) {
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
}
orderDetailResultService.deleteByOrderId(orderEntity.getBillNo()); orderDetailResultService.deleteByOrderId(orderEntity.getBillNo());
orderDetailCodeEntities.forEach(orderDetailCodeEntity -> orderDetailCodeEntities.forEach(orderDetailCodeEntity ->
{ {

@ -382,7 +382,7 @@ public class SpsSyncDownloadService {
Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SUP_CERT, createFile); Map<String, Object> map = basicExportStatusTimeInfo(now, BasicExportStatusTimeEnum.SUP_CERT, createFile);
totalTimeMap.put(BasicExportStatusTimeEnum.SUP_CERT, map); totalTimeMap.put(BasicExportStatusTimeEnum.SUP_CERT, map);
List<SupCertEntity> supCertList = supCertService.list(Wrappers.lambdaQuery(SupCertEntity.class) List<SupCertEntity> supCertList = supCertService.list(Wrappers.lambdaQuery(SupCertEntity.class)
.eq(SupCertEntity::getAuditStatus, ConstantStatus.AUDIT_PASS) .ge(SupCertEntity::getAuditStatus, ConstantStatus.AUDIT_PASS)
.le(!ge && (boolean) map.get("isNew"), SupCertEntity::getUpdateTime, now) .le(!ge && (boolean) map.get("isNew"), SupCertEntity::getUpdateTime, now)
.between(ge, SupCertEntity::getUpdateTime, syncTime, now) .between(ge, SupCertEntity::getUpdateTime, syncTime, now)
.between(!ge && !(boolean) map.get("isNew"), SupCertEntity::getUpdateTime .between(!ge && !(boolean) map.get("isNew"), SupCertEntity::getUpdateTime
@ -392,7 +392,8 @@ public class SpsSyncDownloadService {
jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList); jsonMap.put(SupCertEntity.class.getSimpleName(), supCertList);
for (SupCertEntity supCertEntity : supCertList) { for (SupCertEntity supCertEntity : supCertList) {
if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) { if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) {
syncFiles.add(supCertEntity.getFilePath()); String[] fileNames = supCertEntity.getFilePath().split(",");
syncFiles.addAll(CollUtil.toList(fileNames));
} }
} }
if (CollUtil.isNotEmpty(syncFiles)) { if (CollUtil.isNotEmpty(syncFiles)) {
@ -410,7 +411,7 @@ public class SpsSyncDownloadService {
jsonMap.put(SupCertSetEntity.class.getSimpleName(), supCertSetList); jsonMap.put(SupCertSetEntity.class.getSimpleName(), supCertSetList);
} }
List<SupCompanyEntity> supCompanyList = supCompanyService.list(Wrappers.lambdaQuery(SupCompanyEntity.class) List<SupCompanyEntity> supCompanyList = supCompanyService.list(Wrappers.lambdaQuery(SupCompanyEntity.class)
.eq(SupCompanyEntity::getAuditStatus, ConstantStatus.AUDIT_PASS) .ge(SupCompanyEntity::getAuditStatus, ConstantStatus.AUDIT_PASS)
.le(!ge && (boolean) map.get("isNew"), SupCompanyEntity::getUpdateTime, now) .le(!ge && (boolean) map.get("isNew"), SupCompanyEntity::getUpdateTime, now)
.between(ge, SupCompanyEntity::getUpdateTime, syncTime, now) .between(ge, SupCompanyEntity::getUpdateTime, syncTime, now)
.between(!ge && !(boolean) map.get("isNew"), SupCompanyEntity::getUpdateTime .between(!ge && !(boolean) map.get("isNew"), SupCompanyEntity::getUpdateTime
@ -421,7 +422,7 @@ public class SpsSyncDownloadService {
jsonMap.put(SupCompanyEntity.class.getSimpleName(), supCompanyList); jsonMap.put(SupCompanyEntity.class.getSimpleName(), supCompanyList);
} }
List<SupManufacturerEntity> supManufacturerList = supManufacturerService.list(Wrappers.lambdaQuery(SupManufacturerEntity.class) List<SupManufacturerEntity> supManufacturerList = supManufacturerService.list(Wrappers.lambdaQuery(SupManufacturerEntity.class)
.eq(SupManufacturerEntity::getAuditStatus, ConstantStatus.AUDIT_PASS) .ge(SupManufacturerEntity::getAuditStatus, ConstantStatus.AUDIT_PASS)
.le(!ge && (boolean) map.get("isNew"), SupManufacturerEntity::getUpdateTime, now) .le(!ge && (boolean) map.get("isNew"), SupManufacturerEntity::getUpdateTime, now)
.between(ge, SupManufacturerEntity::getUpdateTime, syncTime, now) .between(ge, SupManufacturerEntity::getUpdateTime, syncTime, now)
.between(!ge && !(boolean) map.get("isNew"), SupManufacturerEntity::getUpdateTime .between(!ge && !(boolean) map.get("isNew"), SupManufacturerEntity::getUpdateTime
@ -432,7 +433,7 @@ public class SpsSyncDownloadService {
jsonMap.put(SupManufacturerEntity.class.getSimpleName(), supManufacturerList); jsonMap.put(SupManufacturerEntity.class.getSimpleName(), supManufacturerList);
} }
List<SupProductEntity> supProductList = supProductService.list(Wrappers.lambdaQuery(SupProductEntity.class) List<SupProductEntity> supProductList = supProductService.list(Wrappers.lambdaQuery(SupProductEntity.class)
.eq(SupProductEntity::getAuditStatus, ConstantStatus.AUDIT_PASS) .ge(SupProductEntity::getAuditStatus, ConstantStatus.AUDIT_PASS)
.le(!ge && (boolean) map.get("isNew"), SupProductEntity::getUpdateTime, now) .le(!ge && (boolean) map.get("isNew"), SupProductEntity::getUpdateTime, now)
.between(ge, SupProductEntity::getUpdateTime, syncTime, now) .between(ge, SupProductEntity::getUpdateTime, syncTime, now)
.between(!ge && !(boolean) map.get("isNew"), SupProductEntity::getUpdateTime .between(!ge && !(boolean) map.get("isNew"), SupProductEntity::getUpdateTime
@ -876,8 +877,13 @@ public class SpsSyncDownloadService {
if (CollUtil.isNotEmpty(bizEntities)) { if (CollUtil.isNotEmpty(bizEntities)) {
orderDetailBizEntities.addAll(bizEntities); orderDetailBizEntities.addAll(bizEntities);
for (IoOrderDetailBizEntity bizEntity : bizEntities) { for (IoOrderDetailBizEntity bizEntity : bizEntities) {
if (StrUtil.isNotEmpty(bizEntity.getCheckFileName())) { if (StrUtil.isNotEmpty(bizEntity.getFilePath())) {
syncFiles.add(bizEntity.getCheckFileName()); String[] fileNames = bizEntity.getFilePath().split(",");
syncFiles.addAll(CollUtil.toList(fileNames));
}
if (StrUtil.isNotEmpty(bizEntity.getColdFilePath())) {
String[] fileNames = bizEntity.getColdFilePath().split(",");
syncFiles.addAll(CollUtil.toList(fileNames));
} }
} }
} }

@ -3,7 +3,7 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: 123456
hikari: hikari:

@ -73,7 +73,7 @@
thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp, thrCheckPdaUn, thrCheckPdaEd, thrCheckUdims, thrCheckPc, thrCheckSp,
thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel, checkVailDate, thrCheckChange, thrCheckBalance, thrCheckCopy, fillCodeRel, checkVailDate,
checkExpire, checkCertExpire, preInBackAction, backPreinType, checkPreInOrders, checkExpire, checkCertExpire, preInBackAction, backPreinType, checkPreInOrders,
sortNum,spaceOut) sortNum, spaceOut)
values (#{mainAction}, #{action}, #{name}, #{enable}, #{remark}, #{thirdSysFk}, #{genUnit}, #{innerOrder}, values (#{mainAction}, #{action}, #{name}, #{enable}, #{remark}, #{thirdSysFk}, #{genUnit}, #{innerOrder},
#{secCheckEnable}, #{checkEnable}, #{checkUdims}, #{checkPdaEd}, #{checkPdaUn}, #{checkPc}, #{secCheckEnable}, #{checkEnable}, #{checkUdims}, #{checkPdaEd}, #{checkPdaUn}, #{checkPc},
#{checkWebNew}, #{checkSp}, #{checkChange}, #{secCheckUdims}, #{secCheckPdaEd}, #{secCheckPdaUn}, #{checkWebNew}, #{checkSp}, #{checkChange}, #{secCheckUdims}, #{secCheckPdaEd}, #{secCheckPdaUn},
@ -86,7 +86,7 @@
#{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims}, #{thrCheckPc}, #{thrCheckSp}, #{thrCheckPdaUn}, #{thrCheckPdaEd}, #{thrCheckUdims}, #{thrCheckPc}, #{thrCheckSp},
#{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}, #{checkVailDate}, #{thrCheckChange}, #{thrCheckBalance}, #{thrCheckCopy}, #{fillCodeRel}, #{checkVailDate},
#{checkExpire}, #{checkCertExpire}, #{preInBackAction}, #{backPreinType}, #{checkPreInOrders}, #{checkExpire}, #{checkCertExpire}, #{preInBackAction}, #{backPreinType}, #{checkPreInOrders},
#{sortNum},#{spaceOut}) #{sortNum}, #{spaceOut})
</insert> </insert>
<select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity"> <select id="selectBusList" resultType="com.glxp.api.entity.basic.BasicBussinessTypeEntity">
@ -260,7 +260,7 @@
AND auth_warehouse_bustype.code = #{code} AND auth_warehouse_bustype.code = #{code}
</if> </if>
<if test="invCode != ''and invCode != null"> <if test="invCode != ''and invCode != null">
AND auth_warehouse_bustype.code = #{code} AND auth_warehouse_bustype.code = #{invCode}
</if> </if>
</where> </where>
group by basic_bussiness_type.action group by basic_bussiness_type.action

@ -38,11 +38,12 @@
<select id="joinQueryList" parameterType="com.glxp.api.req.purchase.PurOrderDetailRequest" <select id="joinQueryList" parameterType="com.glxp.api.req.purchase.PurOrderDetailRequest"
resultType="com.glxp.api.res.purchase.PurOrderDetailResponse"> resultType="com.glxp.api.res.purchase.PurOrderDetailResponse">
SELECT pur_order_detail.*, SELECT pur_order_detail.*,
basic_products.ggxh spec, basic_products.ggxh spec,
basic_products.nameCode nameCode,
basic_products.measname, basic_products.measname,
basic_products.manufactory, basic_products.manufactory,
basic_products.ylqxzcrbarmc, basic_products.ylqxzcrbarmc,
basic_corp.`name` supName basic_corp.`name` supName
FROM pur_order_detail FROM pur_order_detail
left JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id left JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id
left JOIN basic_products ON basic_udirel.uuid = basic_products.uuid left JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
@ -98,6 +99,9 @@
<if test="zczbhhzbapzbh != null"> <if test="zczbhhzbapzbh != null">
zczbhhzbapzbh=#{zczbhhzbapzbh}, zczbhhzbapzbh=#{zczbhhzbapzbh},
</if> </if>
<if test="price != null">
price=#{price},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
@ -106,7 +110,7 @@
<insert id="insertPurOrderDetailEntity" keyProperty="id" <insert id="insertPurOrderDetailEntity" keyProperty="id"
parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity"> parameterType="com.glxp.api.entity.purchase.PurOrderDetailEntity">
REPLACE INTO pur_order_detail REPLACE INTO pur_order_detail
(orderIdFk, productId, productName, count, supId, zczbhhzbapzbh) values (orderIdFk, productId, productName, count, supId, zczbhhzbapzbh, price) values
<foreach collection="datas" item="item" index="index" separator=","> <foreach collection="datas" item="item" index="index" separator=",">
(#{item.orderIdFk}, (#{item.orderIdFk},
@ -114,7 +118,7 @@
#{item.productName}, #{item.productName},
#{item.count}, #{item.count},
#{item.supId}, #{item.supId},
#{item.zczbhhzbapzbh}) #{item.zczbhhzbapzbh}, #{item.price})
</foreach> </foreach>
</insert> </insert>

@ -383,6 +383,8 @@ CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'id', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'bigint ', 2); CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'bigint ', 2);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'price', 'decimal(10, 2)', 1);

Loading…
Cancel
Save