From ee5317f86d6aac98eb7f102219feaee3a6c97638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E5=BC=BA?= Date: Mon, 13 Feb 2023 18:17:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CollectionController.java | 114 +++- .../collection/entity/CollectionEntity.java | 68 +- .../entity/Collection_item0Entity.java | 35 +- .../collection/entity/SaleorderCETEntity.java | 144 ++++ .../collection/mapper/CollectionMapper.java | 2 +- .../mapper/Collection_item0Mapper.java | 2 +- .../collection/mapper/SaleorderCETMapper.java | 17 + .../model/collection/CollectionCrForm.java | 28 +- .../model/collection/CollectionInfoVO.java | 26 +- .../model/collection/CollectionListQuery.java | 2 +- .../model/collection/CollectionListVO.java | 31 +- .../collection/CollectionPagination.java | 2 +- .../CollectionPaginationExportModel.java | 2 +- .../model/collection/CollectionUpForm.java | 30 +- .../collection/Collection_item0Model.java | 51 +- .../collection/service/CollectionService.java | 2 +- .../service/Collection_item0Service.java | 2 +- .../service/SaleorderCETService.java | 20 + .../service/impl/CollectionServiceImpl.java | 2 +- .../impl/Collection_item0ServiceImpl.java | 2 +- .../service/impl/SaleorderCETServiceImpl.java | 28 + ...r.java => CustomerJGMobileController.java} | 83 +-- .../customer/entity/CustomerJGEntity.java | 100 --- .../entity/CustomerJGMobileEntity.java | 56 +- .../customer/mapper/CustomerJGMapper.java | 24 - .../mapper/CustomerJGMobileMapper.java | 17 + .../model/customer/CustomerCrForm.java | 20 +- .../model/customer/CustomerInfoVO.java | 20 +- .../model/customer/CustomerListQuery.java | 2 +- .../model/customer/CustomerListVO.java | 43 +- .../model/customer/CustomerPagination.java | 2 +- .../CustomerPaginationExportModel.java | 2 +- .../model/customer/CustomerUpForm.java | 21 +- .../service/CustomerJGMobileService.java | 34 + .../customer/service/CustomerJGService.java | 40 -- .../impl/CustomerJGMobileServiceImpl.java | 223 +++++++ .../service/impl/CustomerJGServiceImpl.java | 250 ------- .../payment/controller/PaymentController.java | 278 +++++--- .../jnpf/payment/entity/PaymentEntity.java | 7 +- .../payment/entity/Payment_item0Entity.java | 37 +- .../jnpf/payment/mapper/PaymentMapper.java | 4 +- .../payment/mapper/Payment_item0Mapper.java | 4 +- .../payment/model/payment/PaymentCrForm.java | 86 ++- .../payment/model/payment/PaymentInfoVO.java | 88 ++- .../model/payment/PaymentListQuery.java | 5 +- .../payment/model/payment/PaymentListVO.java | 89 +-- .../model/payment/PaymentPagination.java | 5 +- .../payment/PaymentPaginationExportModel.java | 5 +- .../payment/model/payment/PaymentUpForm.java | 93 ++- .../model/payment/Payment_item0Model.java | 73 +++ .../jnpf/payment/service/PaymentService.java | 10 +- .../payment/service/Payment_item0Service.java | 5 +- .../service/impl/PaymentServiceImpl.java | 68 +- .../impl/Payment_item0ServiceImpl.java | 30 +- .../controller/PurchaseorderController.java | 39 +- ...ler.java => SupplierMobileController.java} | 81 +-- .../jnpf/supplier/entity/SupplierEntity.java | 108 --- .../supplier/entity/SupplierMobileEntity.java | 54 +- .../jnpf/supplier/mapper/SupplierMapper.java | 23 - .../supplier/mapper/SupplierMobileMapper.java | 17 + .../model/supplier/SupplierCrForm.java | 18 +- .../model/supplier/SupplierInfoVO.java | 18 +- .../model/supplier/SupplierListQuery.java | 2 +- .../model/supplier/SupplierListVO.java | 36 +- .../model/supplier/SupplierPagination.java | 2 +- .../SupplierPaginationExportModel.java | 2 +- .../model/supplier/SupplierUpForm.java | 19 +- .../service/SupplierMobileService.java | 34 + .../supplier/service/SupplierService.java | 42 -- .../impl/SupplierMobileServiceImpl.java | 223 +++++++ .../service/impl/SupplierServiceImpl.java | 243 ------- .../src/main/resources/SupplierMapper.xml | 2 +- .../supplier/SupplierinvoicesMapper.xml | 2 +- .../basicInformation/collection/Detail.vue | 98 ++- .../scm/basicInformation/collection/Form.vue | 209 ++++-- .../scm/basicInformation/collection/index.vue | 40 +- .../basicInformation/contractfile/Form.vue | 34 +- .../basicInformation/contractfile/index.vue | 34 +- .../scm/basicInformation/customer/Detail.vue | 27 +- .../scm/basicInformation/customer/Form.vue | 442 +++++++------ .../scm/basicInformation/customer/index.vue | 584 ++++++++--------- .../scm/basicInformation/material/Form.vue | 8 +- .../scm/basicInformation/payment/Detail.vue | 192 ++++-- .../scm/basicInformation/payment/Form.vue | 323 +++++++-- .../scm/basicInformation/payment/index.vue | 104 ++- .../basicInformation/purchaseorder/Form.vue | 11 +- .../basicInformation/purchaseorder/index.vue | 28 +- .../scm/basicInformation/receiptin/Form.vue | 44 +- .../scm/basicInformation/supplier/Detail.vue | 23 +- .../scm/basicInformation/supplier/Form.vue | 492 +++++++------- .../scm/basicInformation/supplier/index.vue | 614 ++++++++---------- .../scm/basicInformation/vehicle/Form.vue | 8 +- .../scm/basicInformation/vehicle/index.vue | 24 +- 93 files changed, 3592 insertions(+), 3146 deletions(-) create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/SaleorderCETEntity.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/SaleorderCETMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/collection/service/SaleorderCETService.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/SaleorderCETServiceImpl.java rename SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/{CustomerJGController.java => CustomerJGMobileController.java} (84%) delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGEntity.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGService.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGServiceImpl.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/Payment_item0Model.java rename SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/{SupplierController.java => SupplierMobileController.java} (83%) delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierEntity.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMobileMapper.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierMobileService.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierService.java create mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierMobileServiceImpl.java delete mode 100644 SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierServiceImpl.java diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java index ef950d58..bbe03686 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/controller/CollectionController.java @@ -13,8 +13,11 @@ import jnpf.base.vo.PageListVO; import jnpf.base.vo.PaginationVO; import jnpf.base.UserInfo; import jnpf.base.vo.DownloadVO; +import jnpf.collection.service.SaleorderCETService; import jnpf.config.ConfigValueUtil; import jnpf.exception.DataException; +import jnpf.saleback.entity.SaleorderEntity; +import org.bytedeco.opencv.presets.opencv_core; import org.springframework.transaction.annotation.Transactional; import jnpf.base.entity.ProvinceEntity; import jnpf.collection.model.collection.*; @@ -44,6 +47,8 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import jnpf.util.GeneraterSwapUtil; + +import java.math.BigDecimal; import java.util.*; import jnpf.util.file.UploadUtil; @@ -55,7 +60,7 @@ import jnpf.util.enums.FileTypeEnum; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Slf4j @RestController @@ -78,23 +83,58 @@ public class CollectionController { @Autowired private Collection_item0Service collection_item0Service; + @Autowired + private SaleorderCETService saleorderCETService; + @PostMapping("/confirmprice") + @Transactional + public ActionResult confirmPrice(@RequestBody CollectionListVO collectionListVO) { + CollectionEntity collectionEntity = collectionService.getInfo(collectionListVO.getId()); + if (!collectionEntity.getStatus().equals("2")){ + return ActionResult.fail("审核中,请先通过审核"); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId,collectionListVO.getId()); + List collection_item0EntityList = collection_item0Service.list(queryWrapper); + for (Collection_item0Entity collection_item0Entity : collection_item0EntityList){ + SaleorderCETEntity saleordercetEntity = saleorderCETService.getById(collection_item0Entity.getSalesorderId()); + if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())){ + return ActionResult.fail("已回款金额等于金额"); + } + if (saleordercetEntity.getAmountCollected()!=null && collection_item0Entity.getAmount() !=null) { + BigDecimal sum =saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount()); + saleordercetEntity.setAmountCollected(sum); + if (saleordercetEntity.getAmountCollected().compareTo(saleordercetEntity.getPrice()) > 0) { + return ActionResult.fail("总回款金额大于金额"); + } + saleordercetEntity.setStatus("2"); + saleorderCETService.updateById(saleordercetEntity); + }else { + return ActionResult.fail("已回款金额或回款金额不能为空"); + } + } + return ActionResult.success("认款成功"); + } + /** * 列表 * * @param collectionPagination * @return */ - @PostMapping("/getList") + @PostMapping("/getList") public ActionResult list(@RequestBody CollectionPagination collectionPagination)throws IOException{ List list= collectionService.getList(collectionPagination); //处理id字段转名称,若无需转或者为空可删除 - for(CollectionEntity entity:list){ - } - List listVO=JsonUtil.getJsonToList(list,CollectionListVO.class); - for(CollectionListVO collectionVO:listVO){ - } + for(CollectionEntity entity:list){ + Map customerNameMap = new HashMap<>(); + entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("393371066040385285","supplier_nm","supplier_nm",entity.getCustomerName(),customerNameMap)); + entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher())); + } + List listVO=JsonUtil.getJsonToList(list,CollectionListVO.class); + for(CollectionListVO jg_collectionVO:listVO){ + } PageListVO vo=new PageListVO(); @@ -116,19 +156,15 @@ public class CollectionController { public ActionResult create(@RequestBody @Valid CollectionCrForm collectionCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); + collectionCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false)); CollectionEntity entity = JsonUtil.getJsonToBean(collectionCrForm, CollectionEntity.class); entity.setId(mainId); collectionService.save(entity); List Collection_item0List = JsonUtil.getJsonToList(collectionCrForm.getCollection_item0List(),Collection_item0Entity.class); for(Collection_item0Entity entitys : Collection_item0List){ + entitys.setSalesorderId(entitys.getId()); entitys.setId(RandomUtil.uuId()); entitys.setCollectionId(entity.getId()); - - - - - - collection_item0Service.save(entitys); } @@ -172,6 +208,9 @@ public class CollectionController { List list= collectionService.getTypeList(collectionPagination,collectionPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 for(CollectionEntity entity:list){ + Map customerNameMap = new HashMap<>(); + entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("393371066040385285","supplier_nm","supplier_nm",entity.getCustomerName(),customerNameMap)); + entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher())); } List listVO=JsonUtil.getJsonToList(list,CollectionListVO.class); for(CollectionListVO collectionVO:listVO){ @@ -194,33 +233,33 @@ public class CollectionController { case "documentNo" : entitys.add(new ExcelExportEntity("单据编号" ,"documentNo")); break; - case "businessDate" : - entitys.add(new ExcelExportEntity("业务日期" ,"businessDate")); - break; case "customerName" : entitys.add(new ExcelExportEntity("客户名称" ,"customerName")); break; case "amountCollected" : entitys.add(new ExcelExportEntity("收款金额" ,"amountCollected")); break; - case "paymentType" : - entitys.add(new ExcelExportEntity("收款类型 " ,"paymentType")); - break; case "collectionCount" : entitys.add(new ExcelExportEntity("收款账户" ,"collectionCount")); break; case "collectionBank" : entitys.add(new ExcelExportEntity("收款银行" ,"collectionBank")); break; - case "settlementType" : - entitys.add(new ExcelExportEntity("结算类型" ,"settlementType")); + case "paymentType" : + entitys.add(new ExcelExportEntity("收款类型 " ,"paymentType")); break; case "currency" : entitys.add(new ExcelExportEntity("币别 " ,"currency")); break; + case "settlementType" : + entitys.add(new ExcelExportEntity("结算类型" ,"settlementType")); + break; case "remark" : entitys.add(new ExcelExportEntity("备注信息" ,"remark")); break; + case "voucher" : + entitys.add(new ExcelExportEntity("收款凭证" ,"voucher")); + break; case "status" : entitys.add(new ExcelExportEntity("单据状态 " ,"status")); break; @@ -293,9 +332,24 @@ public class CollectionController { //子表 List Collection_item0List = collectionService.GetCollection_item0List(id); + List collection_item0ModelList = new ArrayList<>(); + Collection_item0Model collection_item0Model = new Collection_item0Model(); for(Collection_item0Entity collection_item0Entity : Collection_item0List){ + SaleorderCETEntity saleorderCETEntity = saleorderCETService.getById(collection_item0Entity.getSalesorderId()); + collection_item0Model.setId(collection_item0Entity.getSalesorderId()); + collection_item0Model.setAmount(String.valueOf(collection_item0Entity.getAmount())); + collection_item0Model.setPrice(String.valueOf(saleorderCETEntity.getPrice())); + collection_item0Model.setAmountCollected(String.valueOf(saleorderCETEntity.getAmountCollected())); + collection_item0Model.setDocumentNo(String.valueOf(saleorderCETEntity.getDocumentNo())); + collection_item0Model.setContractCode(String.valueOf(saleorderCETEntity.getContractCode())); + collection_item0Model.setNum(String.valueOf(saleorderCETEntity.getNum())); + collection_item0Model.setAdvanceAmount(String.valueOf(saleorderCETEntity.getAdvanceAmount())); + collection_item0Model.setRate(String.valueOf(saleorderCETEntity.getRate())); + collection_item0Model.setNotPrice(String.valueOf(saleorderCETEntity.getNotPrice())); + collection_item0Model.setCreatorTime(String.valueOf(saleorderCETEntity.getCreatorTime())); + collection_item0ModelList.add(collection_item0Model); } - vo.setCollection_item0List(JsonUtil.getJsonToList(Collection_item0List,Collection_item0Model.class )); + vo.setCollection_item0List(JsonUtil.getJsonToList(collection_item0ModelList,Collection_item0Model.class )); //副表 return ActionResult.success(vo); } @@ -315,12 +369,15 @@ public class CollectionController { List jg_collection_item0List = collectionService.GetCollection_item0List(id); List jg_collection_item0ModelList = JsonUtil.getJsonToList(jg_collection_item0List,Collection_item0Model.class); for(Collection_item0Model jg_collection_item0Model : jg_collection_item0ModelList){ + Map deleteTimeMap = new HashMap<>(); + jg_collection_item0Model.setDocumentNo(generaterSwapUtil.getPopupSelectValue("393372436705378053","document_no","document_no",jg_collection_item0Model.getDocumentNo(),deleteTimeMap)); } vo.setCollection_item0List(jg_collection_item0ModelList); //附表数据转换 //添加到详情表单对象中 + vo.setVoucher(generaterSwapUtil.getFileNameInJson(vo.getVoucher())); return ActionResult.success(vo); } @@ -339,6 +396,9 @@ public class CollectionController { public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CollectionUpForm collectionUpForm) throws DataException { UserInfo userInfo=userProvider.get(); CollectionEntity entity= collectionService.getInfo(id); + if (entity.getStatus().equals("2") || entity.getStatus().equals("3")){ + return ActionResult.fail("已审核,不允许编辑"); + } if(entity!=null){ CollectionEntity subentity=JsonUtil.getJsonToBean(collectionUpForm, CollectionEntity.class); collectionService.update(id, subentity); @@ -346,15 +406,13 @@ public class CollectionController { QueryWrapper Collection_item0queryWrapper = new QueryWrapper<>(); Collection_item0queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, entity.getId()); collection_item0Service.remove(Collection_item0queryWrapper); + for (Collection_item0Model collection_item0Model : collectionUpForm.getCollection_item0List()){ + collection_item0Model.setCreatorTime(null); + } List Collection_item0List = JsonUtil.getJsonToList(collectionUpForm.getCollection_item0List(),Collection_item0Entity.class); for(Collection_item0Entity entitys : Collection_item0List){ - - - - - - + entitys.setSalesorderId(entitys.getId()); entitys.setId(RandomUtil.uuId()); entitys.setCollectionId(entity.getId()); collection_item0Service.save(entitys); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/CollectionEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/CollectionEntity.java index 78af104c..4f600ed3 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/CollectionEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/CollectionEntity.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data @TableName("jg_collection") @@ -26,36 +26,6 @@ public class CollectionEntity { @TableId("ID") private String id; - @TableField("CREATOR_USER_ID") - private String creatorUserId; - - @TableField("CREATOR_USER_NAME") - private String creatorUserName; - - @TableField("CREATOR_TIME") - private Date creatorTime; - - @TableField("LAST_MODIFY_USER_ID") - private String lastModifyUserId; - - @TableField("LAST_MODIFY_USER_NAME") - private String lastModifyUserName; - - @TableField("LAST_MODIFY_TIME") - private Date lastModifyTime; - - @TableField("DELETE_USER_ID") - private String deleteUserId; - - @TableField("DELETE_USER_NAME") - private String deleteUserName; - - @TableField("DELETE_TIME") - private Date deleteTime; - - @TableField("DELETE_MARK") - private String deleteMark; - @TableField("ORGNIZE_ID") private String orgnizeId; @@ -92,9 +62,15 @@ public class CollectionEntity { @TableField("PAYMENT_TYPE") private String paymentType; + @TableField("VOUCHER") + private String voucher; + @TableField("SETTLEMENT_TYPE") private String settlementType; + @TableField("IS_COLLECTION") + private String IS_COLLECTION; + @TableField("REMARK") private String remark; @@ -104,4 +80,34 @@ public class CollectionEntity { @TableField("COLLECTION_BANK") private String collectionBank; + @TableField("CREATOR_USER_ID") + private String creatorUserId; + + @TableField("CREATOR_USER_NAME") + private String creatorUserName; + + @TableField("CREATOR_TIME") + private Date creatorTime; + + @TableField("LAST_MODIFY_USER_ID") + private String lastModifyUserId; + + @TableField("LAST_MODIFY_USER_NAME") + private String lastModifyUserName; + + @TableField("LAST_MODIFY_TIME") + private Date lastModifyTime; + + @TableField("DELETE_USER_ID") + private String deleteUserId; + + @TableField("DELETE_USER_NAME") + private String deleteUserName; + + @TableField("DELETE_TIME") + private Date deleteTime; + + @TableField("DELETE_MARK") + private String deleteMark; + } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/Collection_item0Entity.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/Collection_item0Entity.java index d9af4e3f..7531a65d 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/Collection_item0Entity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/Collection_item0Entity.java @@ -8,11 +8,8 @@ import lombok.Data; import java.util.Date; import java.math.BigDecimal; -import java.math.BigDecimal; -import java.math.BigDecimal; -import java.math.BigDecimal; -import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonProperty; +import org.bytedeco.opencv.presets.opencv_core; /** @@ -21,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data @TableName("jg_collection_item0") @@ -69,34 +66,10 @@ public class Collection_item0Entity { @TableField("COLLECTION_ID") private String collectionId; - @TableField("ORDER_ID") - private Integer orderId; - - @TableField("CAR_NUMBER") - private String carNumber; - - @TableField("MATERIAL_NAME") - private String materialName; - - @TableField("QUANTITY") - private BigDecimal quantity; - - @TableField("SALE_PRICE") - private BigDecimal salePrice; - - @TableField("TAX_RATE") - private String taxRate; + @TableField("SALESORDER_ID") + private String salesorderId; @TableField("AMOUNT") private BigDecimal amount; - @TableField("AMOUNT_NOT_TAX") - private BigDecimal amountNotTax; - - @TableField("TAX_AMOUNT") - private BigDecimal taxAmount; - - @TableField("REMARK") - private String remark; - } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/SaleorderCETEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/SaleorderCETEntity.java new file mode 100644 index 00000000..e6de7a59 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/entity/SaleorderCETEntity.java @@ -0,0 +1,144 @@ +package jnpf.collection.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + + +/** + * + * 销售订单 + * @版本: V3.2.0 + * @版权: LINKAGE-BOOT + * @作者: LINKAGE-BOOT研发团队 + * @日期: 2023-02-03 + */ +@Data +@TableName("jg_salesorder") +public class SaleorderCETEntity { + + @TableId("ID") + private String id; + + @TableField("CREATOR_USER_ID") + private String creatorUserId; + + @TableField("CREATOR_USER_NAME") + private String creatorUserName; + + @TableField("CREATOR_TIME") + private Date creatorTime; + + @TableField("LAST_MODIFY_USER_ID") + private String lastModifyUserId; + + @TableField("LAST_MODIFY_USER_NAME") + private String lastModifyUserName; + + @TableField("LAST_MODIFY_TIME") + private Date lastModifyTime; + + @TableField("DELETE_USER_ID") + private String deleteUserId; + + @TableField("DELETE_USER_NAME") + private String deleteUserName; + + @TableField("DELETE_TIME") + private Date deleteTime; + + @TableField("DELETE_MARK") + private String deleteMark; + + @TableField("ORGNIZE_ID") + private String orgnizeId; + + @TableField("DEPARTMENT_ID") + private String departmentId; + + @TableField("DOCUMENT_NO") + private String documentNo; + + @TableField("ERP_NO") + private String erpNo; + + @TableField("SOURCE_PO_NO") + private String sourcePoNo; + + @TableField("CONTRACT_CODE") + private String contractCode; + + @TableField("CONTRACT_NAME") + private String contractName; + + @TableField("CONTRACT_NO") + private String contractNo; + + @TableField("COSTOMER_CODE") + private String costomerCode; + + @TableField("COSTOMER_NAME") + private String costomerName; + + @TableField("NUM") + private BigDecimal num; + + @TableField("PRICE") + private BigDecimal price; + + @TableField("NOT_PRICE") + private BigDecimal notPrice; + + @TableField("RATE") + private BigDecimal rate; + + @TableField("POUND_NUM") + private Integer poundNum; + + @TableField("CURRENCY") + private String currency; + + @TableField("ADVANCE_AMOUNT") + private BigDecimal advanceAmount; + + @TableField("AMOUNT_COLLECTED") + private BigDecimal amountCollected; + + @TableField("INVOICE_NUM") + private BigDecimal invoiceNum; + + @TableField("INVOICE_AMOUNT") + private BigDecimal invoiceAmount; + + @TableField("RETURN_QUANTITY") + private BigDecimal returnQuantity; + + @TableField("REF_AMOUNT") + private BigDecimal reamount; + + @TableField("STATUS") + private String status; + + @TableField("SOURCE_SYSTEM") + private String sourceSystem; + + @TableField("IS_SETTLE") + private String isSettle; + + @TableField("ISSUE") + private String issue; + + @TableField("REMARK") + private String remark; + + @TableField("CLOSING_DATE") + private Date closingDate; + + @TableField("OVERDUE_INTEREST") + private BigDecimal overdueInterest; + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/CollectionMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/CollectionMapper.java index 1f05e8c1..17749e73 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/CollectionMapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/CollectionMapper.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ public interface CollectionMapper extends BaseMapper { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/Collection_item0Mapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/Collection_item0Mapper.java index c9101ec8..4e43a038 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/Collection_item0Mapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/Collection_item0Mapper.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ public interface Collection_item0Mapper extends BaseMapper { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/SaleorderCETMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/SaleorderCETMapper.java new file mode 100644 index 00000000..94b19c4b --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/mapper/SaleorderCETMapper.java @@ -0,0 +1,17 @@ +package jnpf.collection.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import jnpf.collection.entity.SaleorderCETEntity; + +/** + * + * saleorder + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-03 + */ +public interface SaleorderCETMapper extends BaseMapper { + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionCrForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionCrForm.java index 7d2652de..5700dbe6 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionCrForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionCrForm.java @@ -15,19 +15,19 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionCrForm { + /** 客户名称 **/ + @JsonProperty("customerCode") + private String customerCode; + /** 单据编号 **/ @JsonProperty("documentNo") private String documentNo; - /** 业务日期 **/ - @JsonProperty("businessDate") - private Long businessDate; - /** 客户名称 **/ @JsonProperty("customerName") private String customerName; @@ -36,10 +36,6 @@ public class CollectionCrForm { @JsonProperty("amountCollected") private String amountCollected; - /** 收款类型 **/ - @JsonProperty("paymentType") - private String paymentType; - /** 收款账户 **/ @JsonProperty("collectionCount") private String collectionCount; @@ -48,18 +44,26 @@ public class CollectionCrForm { @JsonProperty("collectionBank") private String collectionBank; - /** 结算类型 **/ - @JsonProperty("settlementType") - private String settlementType; + /** 收款类型 **/ + @JsonProperty("paymentType") + private String paymentType; /** 币别 **/ @JsonProperty("currency") private String currency; + /** 结算类型 **/ + @JsonProperty("settlementType") + private String settlementType; + /** 备注信息 **/ @JsonProperty("remark") private String remark; + /** 收款凭证 **/ + @JsonProperty("voucher") + private String voucher; + /** 单据状态 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionInfoVO.java index 179f5242..d900ceca 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionInfoVO.java @@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionInfoVO{ @@ -28,9 +28,9 @@ public class CollectionInfoVO{ @JsonProperty("documentNo") private String documentNo; - /** 业务日期 **/ - @JsonProperty("businessDate") - private Long businessDate; + /** 客户名称 **/ + @JsonProperty("customerCode") + private String customerCode; /** 客户名称 **/ @JsonProperty("customerName") @@ -40,10 +40,6 @@ public class CollectionInfoVO{ @JsonProperty("amountCollected") private String amountCollected; - /** 收款类型 **/ - @JsonProperty("paymentType") - private String paymentType; - /** 收款账户 **/ @JsonProperty("collectionCount") private String collectionCount; @@ -52,18 +48,26 @@ public class CollectionInfoVO{ @JsonProperty("collectionBank") private String collectionBank; - /** 结算类型 **/ - @JsonProperty("settlementType") - private String settlementType; + /** 收款类型 **/ + @JsonProperty("paymentType") + private String paymentType; /** 币别 **/ @JsonProperty("currency") private String currency; + /** 结算类型 **/ + @JsonProperty("settlementType") + private String settlementType; + /** 备注信息 **/ @JsonProperty("remark") private String remark; + /** 收款凭证 **/ + @JsonProperty("voucher") + private String voucher; + /** 单据状态 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListQuery.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListQuery.java index 7ed3b299..417d8f70 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListQuery.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListQuery.java @@ -10,7 +10,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionListQuery extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListVO.java index d973cfe4..2384f68f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionListVO.java @@ -15,7 +15,7 @@ import java.math.BigDecimal; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionListVO{ @@ -28,11 +28,9 @@ public class CollectionListVO{ @JsonProperty("documentNo") private String documentNo; - - /** 业务日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @JsonProperty("businessDate") - private Date businessDate; + /** 客户名称 **/ + @JsonProperty("customerCode") + private String customerCode; /** 客户名称 **/ @@ -45,11 +43,6 @@ public class CollectionListVO{ private String amountCollected; - /** 收款类型 **/ - @JsonProperty("paymentType") - private String paymentType; - - /** 收款账户 **/ @JsonProperty("collectionCount") private String collectionCount; @@ -60,9 +53,9 @@ public class CollectionListVO{ private String collectionBank; - /** 结算类型 **/ - @JsonProperty("settlementType") - private String settlementType; + /** 收款类型 **/ + @JsonProperty("paymentType") + private String paymentType; /** 币别 **/ @@ -70,11 +63,21 @@ public class CollectionListVO{ private String currency; + /** 结算类型 **/ + @JsonProperty("settlementType") + private String settlementType; + + /** 备注信息 **/ @JsonProperty("remark") private String remark; + /** 收款凭证 **/ + @JsonProperty("voucher") + private String voucher; + + /** 单据状态 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPagination.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPagination.java index 66e7b1d0..e769898f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPagination.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPagination.java @@ -11,7 +11,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionPagination extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPaginationExportModel.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPaginationExportModel.java index c9bcc162..dad06731 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPaginationExportModel.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionPaginationExportModel.java @@ -9,7 +9,7 @@ import java.util.*; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionPaginationExportModel extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionUpForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionUpForm.java index b36a8b69..a37ed90c 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionUpForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/CollectionUpForm.java @@ -16,7 +16,7 @@ import lombok.Data; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-09 */ @Data public class CollectionUpForm{ @@ -28,10 +28,9 @@ public class CollectionUpForm{ @JsonProperty("documentNo") private String documentNo; - - /** 业务日期 **/ - @JsonProperty("businessDate") - private Long businessDate; + /** 客户名称 **/ + @JsonProperty("customerCode") + private String customerCode; /** 客户名称 **/ @@ -44,11 +43,6 @@ public class CollectionUpForm{ private String amountCollected; - /** 收款类型 **/ - @JsonProperty("paymentType") - private String paymentType; - - /** 收款账户 **/ @JsonProperty("collectionCount") private String collectionCount; @@ -59,9 +53,9 @@ public class CollectionUpForm{ private String collectionBank; - /** 结算类型 **/ - @JsonProperty("settlementType") - private String settlementType; + /** 收款类型 **/ + @JsonProperty("paymentType") + private String paymentType; /** 币别 **/ @@ -69,11 +63,21 @@ public class CollectionUpForm{ private String currency; + /** 结算类型 **/ + @JsonProperty("settlementType") + private String settlementType; + + /** 备注信息 **/ @JsonProperty("remark") private String remark; + /** 收款凭证 **/ + @JsonProperty("voucher") + private String voucher; + + /** 单据状态 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/Collection_item0Model.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/Collection_item0Model.java index 41142344..3bcad6d8 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/Collection_item0Model.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/model/collection/Collection_item0Model.java @@ -13,34 +13,53 @@ import com.alibaba.fastjson.annotation.JSONField; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ @Data public class Collection_item0Model { - /** 金额 **/ + /** 收款金额 **/ @JsonProperty("amount") private String amount; - /** 数量 **/ - @JsonProperty("quantity") - private String quantity; + /** 销售订单主表id **/ + @JsonProperty("id") + private String id; - /** 税率 **/ - @JsonProperty("taxRate") - private String taxRate; + /** 订单金额 **/ + @JsonProperty("price") + private String price; + + /** 已收款金额 **/ + @JsonProperty("amountCollected") + private String amountCollected; + + /** 销售订单编号 **/ + @JsonProperty("documentNo") + private String documentNo; + + /** 合同编号 **/ + @JsonProperty("contractCode") + private String contractCode; + + /** 重量 **/ + @JsonProperty("num") + private String num; + + /** 垫资金额 **/ + @JsonProperty("advanceAmount") + private String advanceAmount; /** 税额 **/ - @JsonProperty("taxAmount") - private String taxAmount; + @JsonProperty("rate") + private String rate; /** 不含税金额 **/ - @JsonProperty("amountNotTax") - private String amountNotTax; - - /** 备注 **/ - @JsonProperty("remark") - private String remark; + @JsonProperty("notPrice") + private String notPrice; + /** 业务日期 **/ + @JsonProperty("creatorTime") + private String creatorTime; } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/CollectionService.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/CollectionService.java index 15c4d688..9be14b3f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/CollectionService.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/CollectionService.java @@ -12,7 +12,7 @@ import java.util.*; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ public interface CollectionService extends IService { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/Collection_item0Service.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/Collection_item0Service.java index d9434395..98d16bdf 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/Collection_item0Service.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/Collection_item0Service.java @@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ public interface Collection_item0Service extends IService { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/SaleorderCETService.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/SaleorderCETService.java new file mode 100644 index 00000000..ad412fe9 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/SaleorderCETService.java @@ -0,0 +1,20 @@ +package jnpf.collection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import jnpf.collection.entity.*; +import jnpf.saleorder.model.saleorder.SaleorderPagination; + +import java.util.List; + +/** + * + * saleorder + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-03 + */ +public interface SaleorderCETService extends IService { + + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/CollectionServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/CollectionServiceImpl.java index 4af6afa5..585ad368 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/CollectionServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/CollectionServiceImpl.java @@ -38,7 +38,7 @@ import java.util.*; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ @Service public class CollectionServiceImpl extends ServiceImpl implements CollectionService{ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/Collection_item0ServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/Collection_item0ServiceImpl.java index f742787a..7e6fcded 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/Collection_item0ServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/Collection_item0ServiceImpl.java @@ -32,7 +32,7 @@ import java.util.*; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-09 */ @Service public class Collection_item0ServiceImpl extends ServiceImpl implements Collection_item0Service{ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/SaleorderCETServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/SaleorderCETServiceImpl.java new file mode 100644 index 00000000..9f2d7d28 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/collection/service/impl/SaleorderCETServiceImpl.java @@ -0,0 +1,28 @@ +package jnpf.collection.service.impl; + + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import jnpf.collection.entity.*; +import jnpf.collection.mapper.SaleorderCETMapper; + +import jnpf.collection.service.*; + +import org.springframework.stereotype.Service; + + + +/** + * + * saleorder + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-03 + */ +@Service +public class SaleorderCETServiceImpl extends ServiceImpl implements SaleorderCETService { + + + +} \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGController.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java similarity index 84% rename from SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGController.java rename to SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java index 35e0c1a3..413b76b5 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/controller/CustomerJGMobileController.java @@ -1,55 +1,56 @@ package jnpf.customer.controller; - import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; -import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import jnpf.base.ActionResult; -import jnpf.base.UserInfo; -import jnpf.base.vo.DownloadVO; import jnpf.base.vo.PageListVO; import jnpf.base.vo.PaginationVO; +import jnpf.base.UserInfo; +import jnpf.base.vo.DownloadVO; import jnpf.config.ConfigValueUtil; -import jnpf.customer.entity.CustomerJGEntity; -import jnpf.customer.entity.CustomerJGMobileEntity; -import jnpf.customer.model.customer.*; -import jnpf.customer.service.CustomerJGService; import jnpf.exception.DataException; +import org.springframework.transaction.annotation.Transactional; +import jnpf.customer.model.customer.*; +import jnpf.customer.model.customer.CustomerPagination; import jnpf.util.*; -import jnpf.util.enums.FileTypeEnum; -import jnpf.util.file.UploadUtil; -import lombok.Cleanup; import lombok.extern.slf4j.Slf4j; +import lombok.Cleanup; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Workbook; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import jnpf.customer.entity.CustomerJGMobileEntity; +import jnpf.customer.service.CustomerJGMobileService; import org.springframework.web.bind.annotation.*; +import org.springframework.beans.factory.annotation.Autowired; import javax.validation.Valid; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import jnpf.util.GeneraterSwapUtil; +import java.util.*; + +import jnpf.util.file.UploadUtil; +import jnpf.util.enums.FileTypeEnum; /** * - * 客户档案 + * customer * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Slf4j @RestController -@Api(tags = "客户档案" , value = "customer") +@Api(tags = "customer" , value = "customer") @RequestMapping("/api/customer/Customer") -public class CustomerJGController { +public class CustomerJGMobileController { @Autowired private GeneraterSwapUtil generaterSwapUtil; @@ -61,7 +62,7 @@ public class CustomerJGController { private UserProvider userProvider; @Autowired - private CustomerJGService customerService; + private CustomerJGMobileService customerJGMobileService; @@ -74,9 +75,10 @@ public class CustomerJGController { */ @PostMapping("/getList") public ActionResult list(@RequestBody CustomerPagination customerPagination)throws IOException{ - List list= customerService.getList(customerPagination); + List list= customerJGMobileService.getList(customerPagination); //处理id字段转名称,若无需转或者为空可删除 for(CustomerJGMobileEntity entity:list){ + entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); } List listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); @@ -103,9 +105,9 @@ public class CustomerJGController { public ActionResult create(@RequestBody @Valid CustomerCrForm customerCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); - CustomerJGEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerJGEntity.class); + CustomerJGMobileEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerJGMobileEntity.class); entity.setId(mainId); - customerService.save(entity); + customerJGMobileService.save(entity); return ActionResult.success("创建成功"); @@ -143,9 +145,10 @@ public class CustomerJGController { return ActionResult.fail("请选择导出字段"); } CustomerPagination customerPagination=JsonUtil.getJsonToBean(customerPaginationExportModel, CustomerPagination.class); - List list= customerService.getTypeList(customerPagination,customerPaginationExportModel.getDataType()); + List list= customerJGMobileService.getTypeList(customerPagination,customerPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 - for(CustomerJGEntity entity:list){ + for(CustomerJGMobileEntity entity:list){ + entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2")); } List listVO=JsonUtil.getJsonToList(list,CustomerListVO.class); @@ -173,23 +176,20 @@ public class CustomerJGController { entitys.add(new ExcelExportEntity("客户名称" ,"supplierNm")); break; case "orgId" : - entitys.add(new ExcelExportEntity("所属公司ID" ,"orgId")); + entitys.add(new ExcelExportEntity("公司名称" ,"orgId")); break; - case "orgName" : - entitys.add(new ExcelExportEntity("公司代码" ,"orgName")); + case "contactName" : + entitys.add(new ExcelExportEntity("联系人" ,"contactName")); break; case "customerLevel" : entitys.add(new ExcelExportEntity("客户等级" ,"customerLevel")); break; - case "contactName" : - entitys.add(new ExcelExportEntity("联系人" ,"contactName")); + case "contactPhone" : + entitys.add(new ExcelExportEntity("电话" ,"contactPhone")); break; case "address" : entitys.add(new ExcelExportEntity("地址" ,"address")); break; - case "contactPhone" : - entitys.add(new ExcelExportEntity("电话" ,"contactPhone")); - break; case "status" : entitys.add(new ExcelExportEntity("是否启用" ,"status")); break; @@ -254,7 +254,7 @@ public class CustomerJGController { */ @GetMapping("/{id}") public ActionResult info(@PathVariable("id") String id){ - CustomerJGEntity entity= customerService.getInfo(id); + CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); //子表 @@ -270,7 +270,7 @@ public class CustomerJGController { */ @GetMapping("/detail/{id}") public ActionResult detailInfo(@PathVariable("id") String id){ - CustomerJGEntity entity= customerService.getInfo(id); + CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class); //子表数据转换 @@ -278,6 +278,7 @@ public class CustomerJGController { //附表数据转换 //添加到详情表单对象中 + vo.setOrgId(generaterSwapUtil.comSelectValues(vo.getOrgId())); vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"2")); return ActionResult.success(vo); @@ -296,10 +297,10 @@ public class CustomerJGController { @Transactional public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CustomerUpForm customerUpForm) throws DataException { UserInfo userInfo=userProvider.get(); - CustomerJGEntity entity= customerService.getInfo(id); + CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); if(entity!=null){ - CustomerJGEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGEntity.class); - customerService.update(id, subentity); + CustomerJGMobileEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGMobileEntity.class); + customerJGMobileService.update(id, subentity); return ActionResult.success("更新成功"); }else{ return ActionResult.fail("更新失败,数据不存在"); @@ -317,9 +318,9 @@ public class CustomerJGController { @DeleteMapping("/{id}") @Transactional public ActionResult delete(@PathVariable("id") String id){ - CustomerJGEntity entity= customerService.getInfo(id); + CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id); if(entity!=null){ - customerService.delete(entity); + customerJGMobileService.delete(entity); } return ActionResult.success("删除成功"); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGEntity.java deleted file mode 100644 index 77910e9a..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGEntity.java +++ /dev/null @@ -1,100 +0,0 @@ -package jnpf.customer.entity; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.util.Date; - - -/** - * - * 客户档案 - * @版本: V3.2.0 - * @版权: LINKAGE-BOOT - * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 - */ -@Data -@TableName("jg_customer") -public class CustomerJGEntity { - - @TableId("ID") - private String id; - - @TableField("CREATOR_USER_ID") - private String creatoruserid; - - @TableField("CREATOR_USER_NAME") - private String creatorusername; - - @TableField("CREATOR_TIME") - private Date creatortime; - - @TableField("LAST_MODIFY_USER_ID") - private String lastmodifyuserid; - - @TableField("LAST_MODIFY_USER_NAME") - private String lastmodifyusername; - - @TableField("LAST_MODIFY_TIME") - private Date lastmodifytime; - - @TableField("DELETE_USER_ID") - private String deleteuserid; - - @TableField("DELETE_USER_NAME") - private String deleteusername; - - @TableField("DELETE_TIME") - private Date deletetime; - - @TableField("DELETE_MARK") - @TableLogic - private String deletemark; - - @TableField("orgnize_id") - private String originId; - - @TableField("department_id") - private String deptId; - - @TableField("SUPPLIER_CD") - private String supplierCd; - - @TableField("SUPPLIER_NM") - private String supplierNm; - - @TableField("SUPPLIER_SITE_ID") - private String supplierSiteId; - - @TableField("SUPPLIER_SITE_CODE") - private String supplierSiteCode; - - @TableField("ORG_ID") - private String orgId; - - @TableField("ORG_NAME") - private String orgName; - - @TableField("VAT_REGISTRATION_NUM") - private String vatRegistrationNum; - - @TableField("CUSTOMER_LEVEL") - private String customerLevel; - - @TableField("CONTACT_NAME") - private String contactName; - - @TableField("CONTACT_PHONE") - private String contactPhone; - - @TableField("STATUS") - private String status; - - @TableField("ADDRESS") - private String address; - -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java index 5f71b6a5..bc71328f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/entity/CustomerJGMobileEntity.java @@ -1,58 +1,65 @@ package jnpf.customer.entity; +import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.math.BigDecimal; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonProperty; + /** - * @Author: WangChuang - * @Date: 8/2/2023 上午8:35 - * @Description //注释: - * @Version 1.0 + * + * 客户档案 + * @版本: V3.2.0 + * @版权: LINKAGE-BOOT + * @作者: LINKAGE-BOOT研发团队 + * @日期: 2023-02-13 */ @Data +@TableName("jg_customer") public class CustomerJGMobileEntity { + @TableId("ID") private String id; @TableField("CREATOR_USER_ID") - private String creatoruserid; + private String creatorUserId; @TableField("CREATOR_USER_NAME") - private String creatorusername; + private String creatorUserName; @TableField("CREATOR_TIME") - private Date creatortime; + private Date creatorTime; @TableField("LAST_MODIFY_USER_ID") - private String lastmodifyuserid; + private String lastModifyUserId; @TableField("LAST_MODIFY_USER_NAME") - private String lastmodifyusername; + private String lastModifyUserName; @TableField("LAST_MODIFY_TIME") - private Date lastmodifytime; + private Date lastModifyTime; @TableField("DELETE_USER_ID") - private String deleteuserid; + private String deleteUserId; @TableField("DELETE_USER_NAME") - private String deleteusername; + private String deleteUserName; @TableField("DELETE_TIME") - private Date deletetime; + private Date deleteTime; @TableField("DELETE_MARK") - private String deletemark; + private String deleteMark; - @TableField("orgnize_id") - private String originId; + @TableField("ORGNIZE_ID") + private String orgnizeId; - @TableField("department_id") - private String deptId; + @TableField("DEPARTMENT_ID") + private String departmentId; @TableField("SUPPLIER_CD") private String supplierCd; @@ -90,15 +97,4 @@ public class CustomerJGMobileEntity { @TableField("ADDRESS") private String address; -// 收获量 - private BigDecimal settlemenSum; -// 净重 - private BigDecimal weightSum; -// 扣重 - private BigDecimal buckleWeightSum; -// 总重 - private BigDecimal grossWeightSum; -// 总额 - private BigDecimal salesPriceSum; - } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMapper.java deleted file mode 100644 index f2ca9696..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package jnpf.customer.mapper; - - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jnpf.customer.entity.CustomerJGEntity; -import jnpf.customer.entity.CustomerJGMobileEntity; -import org.apache.ibatis.annotations.Param; - - -/** - * - * 客户档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -public interface CustomerJGMapper extends BaseMapper { - IPage getMobileList(@Param("page") Page page, @Param("ew") Wrapper ew); - -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java new file mode 100644 index 00000000..c0579e6f --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/mapper/CustomerJGMobileMapper.java @@ -0,0 +1,17 @@ +package jnpf.customer.mapper; + + +import jnpf.customer.entity.CustomerJGMobileEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * + * customer + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +public interface CustomerJGMobileMapper extends BaseMapper { + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java index 83db3708..b5c471ef 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerCrForm.java @@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerCrForm { @@ -27,30 +27,26 @@ public class CustomerCrForm { @JsonProperty("supplierNm") private String supplierNm; - /** 所属公司ID **/ + /** 公司名称 **/ @JsonProperty("orgId") private String orgId; - /** 公司代码 **/ - @JsonProperty("orgName") - private String orgName; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; /** 客户等级 **/ @JsonProperty("customerLevel") private String customerLevel; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 电话 **/ + @JsonProperty("contactPhone") + private String contactPhone; /** 地址 **/ @JsonProperty("address") private String address; - /** 电话 **/ - @JsonProperty("contactPhone") - private String contactPhone; - /** 是否启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java index f8992f5f..b4da77f1 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerInfoVO.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerInfoVO{ @@ -31,30 +31,26 @@ public class CustomerInfoVO{ @JsonProperty("supplierNm") private String supplierNm; - /** 所属公司ID **/ + /** 公司名称 **/ @JsonProperty("orgId") private String orgId; - /** 公司代码 **/ - @JsonProperty("orgName") - private String orgName; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; /** 客户等级 **/ @JsonProperty("customerLevel") private String customerLevel; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 电话 **/ + @JsonProperty("contactPhone") + private String contactPhone; /** 地址 **/ @JsonProperty("address") private String address; - /** 电话 **/ - @JsonProperty("contactPhone") - private String contactPhone; - /** 是否启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java index 6d50e414..5712a48d 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListQuery.java @@ -10,7 +10,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerListQuery extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListVO.java index 66db2196..8727c147 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerListVO.java @@ -3,15 +3,19 @@ package jnpf.customer.model.customer; -import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import java.sql.Time; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.math.BigDecimal; /** * * * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerListVO{ @@ -30,14 +34,14 @@ public class CustomerListVO{ private String supplierNm; - /** 所属公司ID **/ + /** 公司名称 **/ @JsonProperty("orgId") private String orgId; - /** 公司代码 **/ - @JsonProperty("orgName") - private String orgName; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; /** 客户等级 **/ @@ -45,9 +49,9 @@ public class CustomerListVO{ private String customerLevel; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 电话 **/ + @JsonProperty("contactPhone") + private String contactPhone; /** 地址 **/ @@ -55,28 +59,9 @@ public class CustomerListVO{ private String address; - /** 电话 **/ - @JsonProperty("contactPhone") - private String contactPhone; - - /** 是否启用 **/ @JsonProperty("status") private String status; - // 收获量 - @JsonProperty("settlemenSum") - private Double settlemenSum; - // 净重 - @JsonProperty("weightSum") - private Double weightSum; - // 扣重 - @JsonProperty("buckleWeightSum") - private Double buckleWeightSum; - // 总重 - @JsonProperty("grossWeightSum") - private Double grossWeightSum; - // 总额 - @JsonProperty("salesPriceSum") - private Double salesPriceSum; + } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java index 5a77daaf..6f257434 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPagination.java @@ -11,7 +11,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerPagination extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java index bf659776..30aba73b 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerPaginationExportModel.java @@ -9,7 +9,7 @@ import java.util.*; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerPaginationExportModel extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java index 98fd08b5..4d1bcfe3 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/model/customer/CustomerUpForm.java @@ -15,7 +15,7 @@ import lombok.Data; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class CustomerUpForm{ @@ -33,14 +33,14 @@ public class CustomerUpForm{ private String supplierNm; - /** 所属公司ID **/ + /** 公司名称 **/ @JsonProperty("orgId") private String orgId; - /** 公司代码 **/ - @JsonProperty("orgName") - private String orgName; + /** 联系人 **/ + @JsonProperty("contactName") + private String contactName; /** 客户等级 **/ @@ -48,9 +48,9 @@ public class CustomerUpForm{ private String customerLevel; - /** 联系人 **/ - @JsonProperty("contactName") - private String contactName; + /** 电话 **/ + @JsonProperty("contactPhone") + private String contactPhone; /** 地址 **/ @@ -58,11 +58,6 @@ public class CustomerUpForm{ private String address; - /** 电话 **/ - @JsonProperty("contactPhone") - private String contactPhone; - - /** 是否启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java new file mode 100644 index 00000000..dd63948e --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGMobileService.java @@ -0,0 +1,34 @@ +package jnpf.customer.service; + +import jnpf.customer.entity.CustomerJGMobileEntity; +import com.baomidou.mybatisplus.extension.service.IService; +import jnpf.customer.model.customer.CustomerPagination; +import java.util.*; +/** + * + * customer + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +public interface CustomerJGMobileService extends IService { + + List getList(CustomerPagination customerPagination); + + List getTypeList(CustomerPagination customerPagination, String dataType); + + + + CustomerJGMobileEntity getInfo(String id); + + void delete(CustomerJGMobileEntity entity); + + void create(CustomerJGMobileEntity entity); + + boolean update( String id, CustomerJGMobileEntity entity); + +// 子表方法 + + //列表子表数据方法 +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGService.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGService.java deleted file mode 100644 index 12caa302..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/CustomerJGService.java +++ /dev/null @@ -1,40 +0,0 @@ -package jnpf.customer.service; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import jnpf.customer.entity.CustomerJGEntity; -import jnpf.customer.entity.CustomerJGMobileEntity; -import jnpf.customer.model.customer.CustomerPagination; - -import java.util.*; -/** - * - * 客户档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -public interface CustomerJGService extends IService { - - List getList(CustomerPagination customerPagination); - - List getTypeList(CustomerPagination customerPagination, String dataType); - - - - CustomerJGEntity getInfo(String id); - - void delete(CustomerJGEntity entity); - - void create(CustomerJGEntity entity); - - boolean update(String id, CustomerJGEntity entity); - public IPage page(Page page, Wrapper queryWrapper); - -// 子表方法 - - //列表子表数据方法 -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java new file mode 100644 index 00000000..79a7648c --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGMobileServiceImpl.java @@ -0,0 +1,223 @@ +package jnpf.customer.service.impl; + +import jnpf.customer.entity.*; +import jnpf.customer.mapper.CustomerJGMobileMapper; +import jnpf.customer.service.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import cn.hutool.core.util.ObjectUtil; +import jnpf.permission.model.authorize.AuthorizeConditionModel; + + +import jnpf.customer.model.customer.CustomerPagination; + +import jnpf.permission.service.AuthorizeService; +import java.lang.reflect.Field; +import com.baomidou.mybatisplus.annotation.TableField; + + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.beans.factory.annotation.Autowired; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import jnpf.util.*; +import java.util.*; + +/** + * + * customer + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +@Service +public class CustomerJGMobileServiceImpl extends ServiceImpl implements CustomerJGMobileService { + + + @Autowired + private UserProvider userProvider; + + @Autowired + private AuthorizeService authorizeService; + + + + + + @Override + public List getList(CustomerPagination customerPagination){ + String userId=userProvider.get().getUserId(); + List AllIdList =new ArrayList(); + int total=0; + int customerNum =0; + QueryWrapper customerQueryWrapper=new QueryWrapper<>(); + boolean pcPermission = false; + boolean appPermission = false; + boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); + if(isPc && pcPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); + if (ObjectUtil.isEmpty(customerObj)){ + return new ArrayList<>(); + } else { + customerQueryWrapper = (QueryWrapper)customerObj; + customerNum++; + } + } + } + if(!isPc && appPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); + if (ObjectUtil.isEmpty(customerObj)){ + return new ArrayList<>(); + } else { + customerQueryWrapper = (QueryWrapper)customerObj; + customerNum++; + } + + + } + } + if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ + customerNum++; + customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd()); + } + + if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ + customerNum++; + customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm()); + } + + if(AllIdList.size()>0){ + customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); + } + //排序 + if(StringUtil.isEmpty(customerPagination.getSidx())){ + customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); + }else{ + try { + String sidx = customerPagination.getSidx(); + CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); + Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); + declaredField.setAccessible(true); + String value = declaredField.getAnnotation(TableField.class).value(); + customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + } + if((total>0 && AllIdList.size()>0) || total==0){ + Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); + IPage userIPage=this.page(page, customerQueryWrapper); + return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); + }else{ + List list = new ArrayList(); + return customerPagination.setData(list, list.size()); + } + } + @Override + public List getTypeList(CustomerPagination customerPagination, String dataType){ + String userId=userProvider.get().getUserId(); + List AllIdList =new ArrayList(); + int total=0; + int customerNum =0; + QueryWrapper customerQueryWrapper=new QueryWrapper<>(); + boolean pcPermission = false; + boolean appPermission = false; + boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); + if(isPc && pcPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); + if (ObjectUtil.isEmpty(customerObj)){ + return new ArrayList<>(); + } else { + customerQueryWrapper = (QueryWrapper)customerObj; + customerNum++; + } + } + } + if(!isPc && appPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); + if (ObjectUtil.isEmpty(customerObj)){ + return new ArrayList<>(); + } else { + customerQueryWrapper = (QueryWrapper)customerObj; + customerNum++; + } + + + } + } + if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ + customerNum++; + customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd()); + } + + if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ + customerNum++; + customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm()); + } + + if(AllIdList.size()>0){ + customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList); + } + //排序 + if(StringUtil.isEmpty(customerPagination.getSidx())){ + customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd); + }else{ + try { + String sidx = customerPagination.getSidx(); + CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity(); + Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx); + declaredField.setAccessible(true); + String value = declaredField.getAnnotation(TableField.class).value(); + customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + } + if("0".equals(dataType)){ + if((total>0 && AllIdList.size()>0) || total==0){ + Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); + IPage userIPage=this.page(page, customerQueryWrapper); + return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); + }else{ + List list = new ArrayList(); + return customerPagination.setData(list, list.size()); + } + }else{ + return this.list(customerQueryWrapper); + } + } + + @Override + public CustomerJGMobileEntity getInfo(String id){ + QueryWrapper queryWrapper=new QueryWrapper<>(); + queryWrapper.lambda().eq(CustomerJGMobileEntity::getId,id); + return this.getOne(queryWrapper); + } + + @Override + public void create(CustomerJGMobileEntity entity){ + this.save(entity); + } + + @Override + public boolean update(String id, CustomerJGMobileEntity entity){ + entity.setId(id); + return this.updateById(entity); + } + @Override + public void delete(CustomerJGMobileEntity entity){ + if(entity!=null){ + this.removeById(entity.getId()); + } + } + //子表方法 + + //列表子表数据方法 + + +} \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGServiceImpl.java deleted file mode 100644 index add6b4de..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/customer/service/impl/CustomerJGServiceImpl.java +++ /dev/null @@ -1,250 +0,0 @@ -package jnpf.customer.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import jnpf.customer.entity.CustomerJGEntity; -import jnpf.customer.entity.CustomerJGMobileEntity; -import jnpf.customer.mapper.CustomerJGMapper; -import jnpf.customer.model.customer.CustomerPagination; -import jnpf.customer.service.CustomerJGService; -import jnpf.permission.model.authorize.AuthorizeConditionModel; -import jnpf.permission.service.AuthorizeService; -import jnpf.util.ServletUtil; -import jnpf.util.StringUtil; -import jnpf.util.UserProvider; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -/** - * - * 客户档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -@Service -public class CustomerJGServiceImpl extends ServiceImpl implements CustomerJGService{ - - - @Autowired - private UserProvider userProvider; - - @Autowired - private AuthorizeService authorizeService; - - @Resource - private CustomerJGMapper customerJGMapper; - - - - @Override - public List getList(CustomerPagination customerPagination){ - String userId=userProvider.get().getUserId(); - List AllIdList =new ArrayList(); - int total=0; - int customerNum =0; - QueryWrapper customerQueryWrapper=new QueryWrapper<>(); - boolean pcPermission = false; - boolean appPermission = false; - boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); - if(isPc && pcPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); - if (ObjectUtil.isEmpty(customerObj)){ - return new ArrayList<>(); - } else { - customerQueryWrapper = (QueryWrapper)customerObj; - customerNum++; - } - } - } - if(!isPc && appPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); - if (ObjectUtil.isEmpty(customerObj)){ - return new ArrayList<>(); - } else { - customerQueryWrapper = (QueryWrapper)customerObj; - customerNum++; - } - - - } - } - if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ - customerNum++; - customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierCd,customerPagination.getSupplierCd()); - } - - if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ - customerNum++; - customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierNm,customerPagination.getSupplierNm()); - } - - if(StringUtil.isNotEmpty(customerPagination.getKeyword())){ - customerNum++; - customerQueryWrapper.lambda().and(wq -> { - // 拼接sql - wq.like(CustomerJGEntity::getSupplierNm,customerPagination.getKeyword()) - .or() - .like(CustomerJGEntity::getOrgName,customerPagination.getKeyword()) - .or() - .like(CustomerJGEntity::getAddress,customerPagination.getKeyword()); - }); - } - - if(AllIdList.size()>0){ - customerQueryWrapper.lambda().in(CustomerJGEntity::getId, AllIdList); - } - //排序 - if(StringUtil.isEmpty(customerPagination.getSidx())){ - customerQueryWrapper.lambda().orderByDesc(CustomerJGEntity::getSupplierCd); - }else{ - try { - String sidx = customerPagination.getSidx(); - CustomerJGEntity customerEntity = new CustomerJGEntity(); - Field declaredField = customerEntity.getClass().getDeclaredField(sidx); - declaredField.setAccessible(true); - String value = declaredField.getAnnotation(TableField.class).value(); - customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } - } - if((total>0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); - IPage userIPage=this.page(page, customerQueryWrapper); - return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); - }else{ - List list = new ArrayList(); - return customerPagination.setData(list, list.size()); - } - } - - /** - * @TODO 重载page方法 - * @param page - * @param queryWrapper - * @return - */ - @Override - public IPage page( Page page, Wrapper queryWrapper) { - return customerJGMapper.getMobileList(page, queryWrapper); - } - - @Override - public List getTypeList(CustomerPagination customerPagination,String dataType){ - String userId=userProvider.get().getUserId(); - List AllIdList =new ArrayList(); - int total=0; - int customerNum =0; - QueryWrapper customerQueryWrapper=new QueryWrapper<>(); - boolean pcPermission = false; - boolean appPermission = false; - boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); - if(isPc && pcPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); - if (ObjectUtil.isEmpty(customerObj)){ - return new ArrayList<>(); - } else { - customerQueryWrapper = (QueryWrapper)customerObj; - customerNum++; - } - } - } - if(!isPc && appPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer")); - if (ObjectUtil.isEmpty(customerObj)){ - return new ArrayList<>(); - } else { - customerQueryWrapper = (QueryWrapper)customerObj; - customerNum++; - } - - - } - } - if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){ - customerNum++; - customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierCd,customerPagination.getSupplierCd()); - } - - if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){ - customerNum++; - customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierNm,customerPagination.getSupplierNm()); - } - - if(AllIdList.size()>0){ - customerQueryWrapper.lambda().in(CustomerJGEntity::getId, AllIdList); - } - //排序 - if(StringUtil.isEmpty(customerPagination.getSidx())){ - customerQueryWrapper.lambda().orderByDesc(CustomerJGEntity::getSupplierCd); - }else{ - try { - String sidx = customerPagination.getSidx(); - CustomerJGEntity customerEntity = new CustomerJGEntity(); - Field declaredField = customerEntity.getClass().getDeclaredField(sidx); - declaredField.setAccessible(true); - String value = declaredField.getAnnotation(TableField.class).value(); - customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } - } - if("0".equals(dataType)){ - if((total>0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize()); - IPage userIPage=this.page(page, customerQueryWrapper); - return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal()); - }else{ - List list = new ArrayList(); - return customerPagination.setData(list, list.size()); - } - }else{ - return this.list(customerQueryWrapper); - } - } - - @Override - public CustomerJGEntity getInfo(String id){ - QueryWrapper queryWrapper=new QueryWrapper<>(); - queryWrapper.lambda().eq(CustomerJGEntity::getId,id); - return this.getOne(queryWrapper); - } - - @Override - public void create(CustomerJGEntity entity){ - this.save(entity); - } - - @Override - public boolean update(String id, CustomerJGEntity entity){ - entity.setId(id); - return this.updateById(entity); - } - @Override - public void delete(CustomerJGEntity entity){ - if(entity!=null){ - this.removeById(entity.getId()); - } - } - //子表方法 - - //列表子表数据方法 - - -} \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java index 308a9381..1dab8e72 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/controller/PaymentController.java @@ -1,40 +1,62 @@ package jnpf.payment.controller; - import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; -import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import jdk.nashorn.internal.ir.IfNode; import jnpf.base.ActionResult; -import jnpf.base.UserInfo; -import jnpf.base.vo.DownloadVO; import jnpf.base.vo.PageListVO; import jnpf.base.vo.PaginationVO; +import jnpf.base.UserInfo; +import jnpf.base.vo.DownloadVO; +import jnpf.collection.model.collection.Collection_item0Model; import jnpf.config.ConfigValueUtil; import jnpf.exception.DataException; -import jnpf.payment.entity.PaymentEntity; +import jnpf.paymentdoc.entity.Paymentdoc_item0Entity; +import jnpf.paymentdoc.service.Paymentdoc_item0Service; +import jnpf.purchaseback.entity.PurchaseorderEntity; +import jnpf.purchaseback.service.PurchaseorderService; +import org.apache.commons.lang3.math.NumberUtils; +import org.springframework.transaction.annotation.Transactional; +import jnpf.base.entity.ProvinceEntity; import jnpf.payment.model.payment.*; -import jnpf.payment.service.PaymentService; +import jnpf.payment.model.payment.PaymentPagination; +import jnpf.payment.entity.*; +import jnpf.payment.entity.Payment_item0Entity; import jnpf.util.*; -import jnpf.util.enums.FileTypeEnum; -import jnpf.util.file.UploadUtil; -import lombok.Cleanup; +import jnpf.base.util.*; +import jnpf.base.vo.ListVO; +import jnpf.util.context.SpringContext; +import cn.hutool.core.util.ObjectUtil; import lombok.extern.slf4j.Slf4j; +import lombok.Cleanup; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Workbook; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import jnpf.payment.entity.PaymentEntity; +import jnpf.payment.service.PaymentService; +import jnpf.payment.entity.Payment_item0Entity; +import jnpf.payment.service.Payment_item0Service; import org.springframework.web.bind.annotation.*; - +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.multipart.MultipartFile; import javax.validation.Valid; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import jnpf.util.GeneraterSwapUtil; + +import java.math.BigDecimal; +import java.util.*; + +import jnpf.util.file.UploadUtil; +import jnpf.util.enums.FileTypeEnum; /** * @@ -42,12 +64,12 @@ import java.util.Map; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Slf4j @RestController -@Api(tags = "payment" , value = "example") -@RequestMapping("/api/example/Payment") +@Api(tags = "payment" , value = "payment") +@RequestMapping("/api/payment/Payment") public class PaymentController { @Autowired @@ -62,9 +84,43 @@ public class PaymentController { @Autowired private PaymentService paymentService; + @Autowired + private Payment_item0Service payment_item0Service; + + @Autowired + private Paymentdoc_item0Service paymentdoc_item0Service; + + @Autowired + private PurchaseorderService purchaseorderService; + @PostMapping("/confirmprice") + @Transactional + public ActionResult confirmPrice(@RequestBody PaymentListVO paymentListVO) { + PaymentEntity paymentEntity = paymentService.getInfo(paymentListVO.getId()); + if (!paymentEntity.getStatus().equals("2")){ + return ActionResult.fail("审核中,请先通过审核"); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId,paymentListVO.getId()); + List dList = payment_item0Service.list(queryWrapper); + for (Payment_item0Entity payment_item0Entity : dList){ + Paymentdoc_item0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId()); + PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdoc_item0Entity.getPurchaseorderId()); + if (purchaseorderEntity.getPayPrice().equals(purchaseorderEntity.getAmount())){ + return ActionResult.fail("回款金额等于金额"); + } + BigDecimal sum = purchaseorderEntity.getPayPrice().add(payment_item0Entity.getAmount()); + if (sum.compareTo(purchaseorderEntity.getAmount()) > 0){ + return ActionResult.fail("总回款金额大于金额"); + } + purchaseorderEntity.setPayPrice(sum); + purchaseorderEntity.setStatus("1"); + purchaseorderService.updateById(purchaseorderEntity); + } + return ActionResult.success("认款成功"); + } /** * 列表 * @@ -76,12 +132,6 @@ public class PaymentController { List list= paymentService.getList(paymentPagination); //处理id字段转名称,若无需转或者为空可删除 for(PaymentEntity entity:list){ - entity.setCreatorUserId(generaterSwapUtil.comSelectValue(entity.getCreatorUserId(), "last")); - entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName())); - entity.setLastModifyUserId(generaterSwapUtil.userSelectValue(entity.getLastModifyUserId())); - entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName())); - entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId())); - entity.setOrgnizeId(generaterSwapUtil.posSelectValue(entity.getOrgnizeId())); } List listVO=JsonUtil.getJsonToList(list,PaymentListVO.class); for(PaymentListVO paymentVO:listVO){ @@ -107,18 +157,17 @@ public class PaymentController { public ActionResult create(@RequestBody @Valid PaymentCrForm paymentCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); - paymentCrForm.setCreatorUserId(StringUtil.isEmpty(userInfo.getDepartmentId()) ? userInfo.getOrganizeId() : userInfo.getDepartmentId()); - paymentCrForm.setCreatorUserName(userInfo.getUserId()); - paymentCrForm.setCreatorTime(DateUtil.getNow()); - if(userInfo.getPositionIds()!=null&&userInfo.getPositionIds().length>0){ - paymentCrForm.setDepartmentId(userInfo.getPositionIds()[0]); - } - if(userInfo.getPositionIds()!=null&&userInfo.getPositionIds().length>0){ - paymentCrForm.setOrgnizeId(userInfo.getPositionIds()[0]); - } + paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false)); PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class); entity.setId(mainId); paymentService.save(entity); + List Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); + for(Payment_item0Entity entitys : Payment_item0List){ + entitys.setId(RandomUtil.uuId()); + entitys.setPaymentId(entity.getId()); + payment_item0Service.save(entitys); + } + return ActionResult.success("创建成功"); @@ -159,12 +208,6 @@ public class PaymentController { List list= paymentService.getTypeList(paymentPagination,paymentPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 for(PaymentEntity entity:list){ - entity.setCreatorUserId(generaterSwapUtil.comSelectValue(entity.getCreatorUserId(), "last")); - entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName())); - entity.setLastModifyUserId(generaterSwapUtil.userSelectValue(entity.getLastModifyUserId())); - entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName())); - entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId())); - entity.setOrgnizeId(generaterSwapUtil.posSelectValue(entity.getOrgnizeId())); } List listVO=JsonUtil.getJsonToList(list,PaymentListVO.class); for(PaymentListVO paymentVO:listVO){ @@ -184,20 +227,14 @@ public class PaymentController { if(keys.length>0){ for(String key:keys){ switch(key){ - case "businessdate" : - entitys.add(new ExcelExportEntity("业务日期" ,"businessdate")); - break; case "documentno" : entitys.add(new ExcelExportEntity("单据编号" ,"documentno")); break; case "suppliername" : - entitys.add(new ExcelExportEntity("客户" ,"suppliername")); - break; - case "currency" : - entitys.add(new ExcelExportEntity("币别" ,"currency")); + entitys.add(new ExcelExportEntity("供应商" ,"suppliername")); break; - case "paymentamount" : - entitys.add(new ExcelExportEntity("付款金额" ,"paymentamount")); + case "paymenttype" : + entitys.add(new ExcelExportEntity("付款类型" ,"paymenttype")); break; case "paymentaccount" : entitys.add(new ExcelExportEntity("付款账户" ,"paymentaccount")); @@ -205,38 +242,35 @@ public class PaymentController { case "paymentbank" : entitys.add(new ExcelExportEntity("付款银行" ,"paymentbank")); break; - case "paymenttype" : - entitys.add(new ExcelExportEntity("付款类型" ,"paymenttype")); - break; - case "settlementtype" : - entitys.add(new ExcelExportEntity("结算类型" ,"settlementtype")); + case "paymentamount" : + entitys.add(new ExcelExportEntity("付款金额" ,"paymentamount")); break; - case "status" : - entitys.add(new ExcelExportEntity("单据状态" ,"status")); + case "collectionaccount" : + entitys.add(new ExcelExportEntity("收款账户" ,"collectionaccount")); break; - case "creatorUserId" : - entitys.add(new ExcelExportEntity("创建人id" ,"creatorUserId")); + case "collectionbank" : + entitys.add(new ExcelExportEntity("收款银行" ,"collectionbank")); break; - case "creatorUserName" : - entitys.add(new ExcelExportEntity("创建人名称" ,"creatorUserName")); + case "requestedamount" : + entitys.add(new ExcelExportEntity("申请金额" ,"requestedamount")); break; - case "creatorTime" : - entitys.add(new ExcelExportEntity("创建时间" ,"creatorTime")); + case "duedate" : + entitys.add(new ExcelExportEntity("应付日期" ,"duedate")); break; - case "lastModifyUserId" : - entitys.add(new ExcelExportEntity("修改人id" ,"lastModifyUserId")); + case "currency" : + entitys.add(new ExcelExportEntity("币别 " ,"currency")); break; - case "lastModifyUserName" : - entitys.add(new ExcelExportEntity("修改人名称" ,"lastModifyUserName")); + case "settlementtype" : + entitys.add(new ExcelExportEntity("结算类型" ,"settlementtype")); break; - case "lastModifyTime" : - entitys.add(new ExcelExportEntity("修改时间" ,"lastModifyTime")); + case "paymentno" : + entitys.add(new ExcelExportEntity("来源单号" ,"paymentno")); break; - case "departmentId" : - entitys.add(new ExcelExportEntity("部门id" ,"departmentId")); + case "remark" : + entitys.add(new ExcelExportEntity("备注" ,"remark")); break; - case "orgnizeId" : - entitys.add(new ExcelExportEntity("组织id" ,"orgnizeId")); + case "status" : + entitys.add(new ExcelExportEntity("单据状态" ,"status")); break; default: break; @@ -269,6 +303,28 @@ public class PaymentController { } + /** + * 批量删除 + * + * @param ids + * @return + */ + @DeleteMapping("/batchRemove/{ids}") + @Transactional + public ActionResult batchRemove(@PathVariable("ids") String ids){ + String[] idList = ids.split(","); + int i =0; + for (String allId : idList){ + this.delete(allId); + i++; + } + if (i == 0 ){ + return ActionResult.fail("删除失败"); + } + return ActionResult.success("删除成功"); + } + + /** * 信息 * @@ -279,20 +335,27 @@ public class PaymentController { public ActionResult info(@PathVariable("id") String id){ PaymentEntity entity= paymentService.getInfo(id); PaymentInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentInfoVO.class); - vo.setCreatorUserId(generaterSwapUtil.comSelectValue(vo.getCreatorUserId(), "last")); - vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName())); - if(vo.getCreatorTime()!=null){ - vo.setCreatorTime(vo.getCreatorTime()); - } - vo.setLastModifyUserId(generaterSwapUtil.userSelectValue(vo.getLastModifyUserId())); - vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName())); - if(vo.getLastModifyTime()!=null){ - vo.setLastModifyTime(vo.getLastModifyTime()); - } - vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId())); - vo.setOrgnizeId(generaterSwapUtil.posSelectValue(vo.getOrgnizeId())); //子表 + List Payment_item0List = paymentService.GetPayment_item0List(id); + List payment_item0Models = new ArrayList<>(); + Payment_item0Model payment_item0Model = new Payment_item0Model(); + for(Payment_item0Entity payment_item0Entity : Payment_item0List){ + Paymentdoc_item0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId()); + PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdoc_item0Entity.getPurchaseorderId()); + payment_item0Model.setAmount(String.valueOf(payment_item0Entity.getAmount())); +// payment_item0Model.setAmount(String.valueOf(purchaseorderEntity.getAmount())); +// payment_item0Model.setAmount(String.valueOf(purchaseorderEntity.getAmount())); + payment_item0Model.setPayPrice(String.valueOf(purchaseorderEntity.getPayPrice())); + payment_item0Model.setDocumentNo(String.valueOf(purchaseorderEntity.getDocumentNo())); + payment_item0Model.setContractCode(String.valueOf(purchaseorderEntity.getContractCode())); + payment_item0Model.setNum(String.valueOf(purchaseorderEntity.getNum())); + payment_item0Model.setAdvanceAmount(String.valueOf(purchaseorderEntity.getAdvanceAmount())); + payment_item0Model.setRate(String.valueOf(purchaseorderEntity.getRate())); + payment_item0Model.setNotAmount(String.valueOf(purchaseorderEntity.getNotAmount())); + payment_item0Models.add(payment_item0Model); + } + vo.setPayment_item0List(payment_item0Models); //副表 return ActionResult.success(vo); } @@ -309,16 +372,15 @@ public class PaymentController { PaymentInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentInfoVO.class); //子表数据转换 + List jg_payment_item0List = paymentService.GetPayment_item0List(id); + List jg_payment_item0ModelList = JsonUtil.getJsonToList(jg_payment_item0List,Payment_item0Model.class); + for(Payment_item0Model jg_payment_item0Model : jg_payment_item0ModelList){ + } + vo.setPayment_item0List(jg_payment_item0ModelList); //附表数据转换 //添加到详情表单对象中 - vo.setCreatorUserId(generaterSwapUtil.comSelectValue(vo.getCreatorUserId(), "last")); - vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName())); - vo.setLastModifyUserId(generaterSwapUtil.userSelectValue(vo.getLastModifyUserId())); - vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName())); - vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId())); - vo.setOrgnizeId(generaterSwapUtil.posSelectValue(vo.getOrgnizeId())); return ActionResult.success(vo); } @@ -336,26 +398,29 @@ public class PaymentController { @Transactional public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid PaymentUpForm paymentUpForm) throws DataException { UserInfo userInfo=userProvider.get(); - PaymentEntity entity= paymentService.getInfo(id); + if (entity.getStatus().equals("2")){ + return ActionResult.fail("已审核,不允许编辑"); + } if(entity!=null){ - -// paymentCrForm.setCreatorUserId(StringUtil.isEmpty(userInfo.getDepartmentId()) ? userInfo.getOrganizeId() : userInfo.getDepartmentId()); -// paymentCrForm.setCreatorUserName(userInfo.getUserId()); - - paymentUpForm.setCreatorUserId(entity.getCreatorUserId()); - paymentUpForm.setLastModifyUserId(userInfo.getUserId()); - paymentUpForm.setLastModifyUserName(userInfo.getUserId()); - paymentUpForm.setLastModifyTime(DateUtil.getNow()); - paymentUpForm.setDepartmentId(entity.getDepartmentId()); - paymentUpForm.setOrgnizeId(entity.getOrgnizeId()); PaymentEntity subentity=JsonUtil.getJsonToBean(paymentUpForm, PaymentEntity.class); - subentity.setCreatorUserName(entity.getCreatorUserName()); - subentity.setCreatorTime(entity.getCreatorTime()); paymentService.update(id, subentity); - System.out.println("#################"); - System.out.println(subentity); - System.out.println(userInfo); + + QueryWrapper Payment_item0queryWrapper = new QueryWrapper<>(); + Payment_item0queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId, entity.getId()); + List list = payment_item0Service.list(Payment_item0queryWrapper); + payment_item0Service.remove(Payment_item0queryWrapper); + + List Payment_item0List = JsonUtil.getJsonToList(paymentUpForm.getPayment_item0List(),Payment_item0Entity.class); + for(Payment_item0Entity entitys : Payment_item0List){ + entitys.setId(RandomUtil.uuId()); + entitys.setPaymentId(entity.getId()); + for (Payment_item0Entity payment_item0Entity : list) { + entitys.setPaymentdocitemId(payment_item0Entity.getPaymentdocitemId()); + } + payment_item0Service.save(entitys); + } + return ActionResult.success("更新成功"); }else{ return ActionResult.fail("更新失败,数据不存在"); @@ -376,6 +441,9 @@ public class PaymentController { PaymentEntity entity= paymentService.getInfo(id); if(entity!=null){ paymentService.delete(entity); + QueryWrapper queryWrapperPayment_item0=new QueryWrapper<>(); + queryWrapperPayment_item0.lambda().eq(Payment_item0Entity::getPaymentId,entity.getId()); + payment_item0Service.remove(queryWrapperPayment_item0); } return ActionResult.success("删除成功"); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/PaymentEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/PaymentEntity.java index afab1714..2a50e8aa 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/PaymentEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/PaymentEntity.java @@ -1,12 +1,15 @@ package jnpf.payment.entity; +import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.math.BigDecimal; import java.util.Date; +import java.math.BigDecimal; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -15,7 +18,7 @@ import java.util.Date; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data @TableName("jg_payment") diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/Payment_item0Entity.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/Payment_item0Entity.java index 6af442b4..803d8433 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/Payment_item0Entity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/entity/Payment_item0Entity.java @@ -1,12 +1,14 @@ package jnpf.payment.entity; +import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.math.BigDecimal; import java.util.Date; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -15,7 +17,7 @@ import java.util.Date; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data @TableName("jg_payment_item0") @@ -63,37 +65,10 @@ public class Payment_item0Entity { @TableField("PAYMENT_ID") private String paymentId; - @TableField("PAYMENTID") - private String paymentid; - - @TableField("CARNUMBER") - private String carnumber; - - @TableField("MATERIALNAME") - private String materialname; - - @TableField("QUANTITY") - private BigDecimal quantity; - - @TableField("PURCHASEPRICE") - private BigDecimal purchaseprice; - - @TableField("TAXRATE") - private String taxrate; - @TableField("AMOUNT") private BigDecimal amount; - @TableField("AMOUNTNOTTAX") - private BigDecimal amountnottax; - - @TableField("TAXAMOUNT") - private BigDecimal taxamount; - - @TableField("REMARK") - private String remark; - - @TableField("ISPAY") - private String ispay; + @TableField("PAYMENTDOCITEM_ID") + private String paymentdocitemId; } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/PaymentMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/PaymentMapper.java index 004524dc..327d3654 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/PaymentMapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/PaymentMapper.java @@ -1,8 +1,8 @@ package jnpf.payment.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import jnpf.payment.entity.PaymentEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @@ -10,7 +10,7 @@ import jnpf.payment.entity.PaymentEntity; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ public interface PaymentMapper extends BaseMapper { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/Payment_item0Mapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/Payment_item0Mapper.java index 8572fc68..04860f5c 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/Payment_item0Mapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/mapper/Payment_item0Mapper.java @@ -1,8 +1,8 @@ package jnpf.payment.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import jnpf.payment.entity.Payment_item0Entity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @@ -10,7 +10,7 @@ import jnpf.payment.entity.Payment_item0Entity; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ public interface Payment_item0Mapper extends BaseMapper { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentCrForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentCrForm.java index 8bc8ab09..31a9625b 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentCrForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentCrForm.java @@ -2,6 +2,7 @@ package jnpf.payment.model.payment; +import jnpf.payment.model.payment.Payment_item0Model; import lombok.Data; import java.util.List; import java.math.BigDecimal; @@ -14,30 +15,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentCrForm { - /** 业务日期 **/ - @JsonProperty("businessdate") - private Long businessdate; - /** 单据编号 **/ @JsonProperty("documentno") private String documentno; - /** 客户 **/ + /** 供应商 **/ @JsonProperty("suppliername") private String suppliername; - /** 币别 **/ - @JsonProperty("currency") - private String currency; - - /** 付款金额 **/ - @JsonProperty("paymentamount") - private String paymentamount; + /** 付款类型 **/ + @JsonProperty("paymenttype") + private String paymenttype; /** 付款账户 **/ @JsonProperty("paymentaccount") @@ -47,50 +40,49 @@ public class PaymentCrForm { @JsonProperty("paymentbank") private String paymentbank; - /** 付款类型 **/ - @JsonProperty("paymenttype") - private String paymenttype; - - /** 结算类型 **/ - @JsonProperty("settlementtype") - private String settlementtype; + /** 付款金额 **/ + @JsonProperty("paymentamount") + private String paymentamount; - /** 单据状态 **/ - @JsonProperty("status") - private String status; + /** 收款账户 **/ + @JsonProperty("collectionaccount") + private String collectionaccount; - /** 创建人id **/ - @JsonProperty("creatorUserId") - private String creatorUserId; + /** 收款银行 **/ + @JsonProperty("collectionbank") + private String collectionbank; - /** 创建人名称 **/ - @JsonProperty("creatorUserName") - private String creatorUserName; + /** 申请金额 **/ + @JsonProperty("requestedamount") + private String requestedamount; - /** 创建时间 **/ - @JsonProperty("creatorTime") - private String creatorTime; + /** 应付日期 **/ + @JsonProperty("duedate") + private Long duedate; - /** 修改人id **/ - @JsonProperty("lastModifyUserId") - private String lastModifyUserId; + /** 币别 **/ + @JsonProperty("currency") + private String currency; - /** 修改人名称 **/ - @JsonProperty("lastModifyUserName") - private String lastModifyUserName; + /** 结算类型 **/ + @JsonProperty("settlementtype") + private String settlementtype; - /** 修改时间 **/ - @JsonProperty("lastModifyTime") - private String lastModifyTime; + /** 来源单号 **/ + @JsonProperty("paymentno") + private String paymentno; - /** 部门id **/ - @JsonProperty("departmentId") - private String departmentId; + /** 备注 **/ + @JsonProperty("remark") + private String remark; - /** 组织id **/ - @JsonProperty("orgnizeId") - private String orgnizeId; + /** 单据状态 **/ + @JsonProperty("status") + private String status; + /** 子表数据 **/ + @JsonProperty("payment_item0List") + private List payment_item0List; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentInfoVO.java index 7dff17de..40430926 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentInfoVO.java @@ -3,6 +3,7 @@ package jnpf.payment.model.payment; +import jnpf.payment.model.payment.Payment_item0Model; import lombok.Data; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentInfoVO{ @@ -23,25 +24,17 @@ public class PaymentInfoVO{ @JsonProperty("id") private String id; - /** 业务日期 **/ - @JsonProperty("businessdate") - private Long businessdate; - /** 单据编号 **/ @JsonProperty("documentno") private String documentno; - /** 客户 **/ + /** 供应商 **/ @JsonProperty("suppliername") private String suppliername; - /** 币别 **/ - @JsonProperty("currency") - private String currency; - - /** 付款金额 **/ - @JsonProperty("paymentamount") - private String paymentamount; + /** 付款类型 **/ + @JsonProperty("paymenttype") + private String paymenttype; /** 付款账户 **/ @JsonProperty("paymentaccount") @@ -51,50 +44,47 @@ public class PaymentInfoVO{ @JsonProperty("paymentbank") private String paymentbank; - /** 付款类型 **/ - @JsonProperty("paymenttype") - private String paymenttype; - - /** 结算类型 **/ - @JsonProperty("settlementtype") - private String settlementtype; + /** 付款金额 **/ + @JsonProperty("paymentamount") + private String paymentamount; - /** 单据状态 **/ - @JsonProperty("status") - private String status; + /** 收款账户 **/ + @JsonProperty("collectionaccount") + private String collectionaccount; - /** 创建人id **/ - @JsonProperty("creatorUserId") - private String creatorUserId; + /** 收款银行 **/ + @JsonProperty("collectionbank") + private String collectionbank; - /** 创建人名称 **/ - @JsonProperty("creatorUserName") - private String creatorUserName; + /** 申请金额 **/ + @JsonProperty("requestedamount") + private String requestedamount; - /** 创建时间 **/ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - @JsonProperty("creatorTime") - private Date creatorTime; + /** 应付日期 **/ + @JsonProperty("duedate") + private Long duedate; - /** 修改人id **/ - @JsonProperty("lastModifyUserId") - private String lastModifyUserId; + /** 币别 **/ + @JsonProperty("currency") + private String currency; - /** 修改人名称 **/ - @JsonProperty("lastModifyUserName") - private String lastModifyUserName; + /** 结算类型 **/ + @JsonProperty("settlementtype") + private String settlementtype; - /** 修改时间 **/ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - @JsonProperty("lastModifyTime") - private Date lastModifyTime; + /** 来源单号 **/ + @JsonProperty("paymentno") + private String paymentno; - /** 部门id **/ - @JsonProperty("departmentId") - private String departmentId; + /** 备注 **/ + @JsonProperty("remark") + private String remark; - /** 组织id **/ - @JsonProperty("orgnizeId") - private String orgnizeId; + /** 单据状态 **/ + @JsonProperty("status") + private String status; + /** 子表数据 **/ + @JsonProperty("payment_item0List") + private List payment_item0List; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListQuery.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListQuery.java index be8a5d12..70a21df9 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListQuery.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListQuery.java @@ -10,16 +10,13 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentListQuery extends Pagination { /** 单据编号 */ private String documentno; - - /** 客户 */ - private String suppliername; /** * 菜单id */ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListVO.java index 728bd830..5a0e445a 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentListVO.java @@ -15,7 +15,7 @@ import java.math.BigDecimal; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentListVO{ @@ -24,30 +24,19 @@ public class PaymentListVO{ private String id; - /** 业务日期 **/ - @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") - @JsonProperty("businessdate") - private Date businessdate; - - /** 单据编号 **/ @JsonProperty("documentno") private String documentno; - /** 客户 **/ + /** 供应商 **/ @JsonProperty("suppliername") private String suppliername; - /** 币别 **/ - @JsonProperty("currency") - private String currency; - - - /** 付款金额 **/ - @JsonProperty("paymentamount") - private String paymentamount; + /** 付款类型 **/ + @JsonProperty("paymenttype") + private String paymenttype; /** 付款账户 **/ @@ -60,61 +49,55 @@ public class PaymentListVO{ private String paymentbank; - /** 付款类型 **/ - @JsonProperty("paymenttype") - private String paymenttype; - - - /** 结算类型 **/ - @JsonProperty("settlementtype") - private String settlementtype; + /** 付款金额 **/ + @JsonProperty("paymentamount") + private String paymentamount; - /** 单据状态 **/ - @JsonProperty("status") - private String status; + /** 收款账户 **/ + @JsonProperty("collectionaccount") + private String collectionaccount; - /** 创建人id **/ - @JsonProperty("creatorUserId") - private String creatorUserId; + /** 收款银行 **/ + @JsonProperty("collectionbank") + private String collectionbank; - /** 创建人名称 **/ - @JsonProperty("creatorUserName") - private String creatorUserName; + /** 申请金额 **/ + @JsonProperty("requestedamount") + private String requestedamount; - /** 创建时间 **/ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - @JsonProperty("creatorTime") - private Date creatorTime; + /** 应付日期 **/ + @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") + @JsonProperty("duedate") + private Date duedate; - /** 修改人id **/ - @JsonProperty("lastModifyUserId") - private String lastModifyUserId; + /** 币别 **/ + @JsonProperty("currency") + private String currency; - /** 修改人名称 **/ - @JsonProperty("lastModifyUserName") - private String lastModifyUserName; + /** 结算类型 **/ + @JsonProperty("settlementtype") + private String settlementtype; - /** 修改时间 **/ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - @JsonProperty("lastModifyTime") - private Date lastModifyTime; + /** 来源单号 **/ + @JsonProperty("paymentno") + private String paymentno; - /** 部门id **/ - @JsonProperty("departmentId") - private String departmentId; + /** 备注 **/ + @JsonProperty("remark") + private String remark; - /** 组织id **/ - @JsonProperty("orgnizeId") - private String orgnizeId; + /** 单据状态 **/ + @JsonProperty("status") + private String status; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPagination.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPagination.java index b02aae2c..8b53ae51 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPagination.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPagination.java @@ -11,16 +11,13 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentPagination extends Pagination { /** 单据编号 */ private String documentno; - - /** 客户 */ - private String suppliername; /** * 菜单id */ diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPaginationExportModel.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPaginationExportModel.java index 13a99e3b..4379c815 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPaginationExportModel.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentPaginationExportModel.java @@ -9,7 +9,7 @@ import java.util.*; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentPaginationExportModel extends Pagination { @@ -23,7 +23,4 @@ public class PaymentPaginationExportModel extends Pagination { /** 单据编号 */ private String documentno; - - /** 客户 */ - private String suppliername; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentUpForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentUpForm.java index 16eab1ad..9e56baaf 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentUpForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/PaymentUpForm.java @@ -2,7 +2,12 @@ package jnpf.payment.model.payment; +import jnpf.payment.model.payment.Payment_item0Model; +import lombok.Data; +import java.util.List; +import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonProperty; + import lombok.Data; /** @@ -11,7 +16,7 @@ import lombok.Data; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-11 + * @日期: 2023-02-10 */ @Data public class PaymentUpForm{ @@ -19,29 +24,19 @@ public class PaymentUpForm{ private String id; - /** 业务日期 **/ - @JsonProperty("businessdate") - private Long businessdate; - - /** 单据编号 **/ @JsonProperty("documentno") private String documentno; - /** 客户 **/ + /** 供应商 **/ @JsonProperty("suppliername") private String suppliername; - /** 币别 **/ - @JsonProperty("currency") - private String currency; - - - /** 付款金额 **/ - @JsonProperty("paymentamount") - private String paymentamount; + /** 付款类型 **/ + @JsonProperty("paymenttype") + private String paymenttype; /** 付款账户 **/ @@ -54,59 +49,57 @@ public class PaymentUpForm{ private String paymentbank; - /** 付款类型 **/ - @JsonProperty("paymenttype") - private String paymenttype; - - - /** 结算类型 **/ - @JsonProperty("settlementtype") - private String settlementtype; + /** 付款金额 **/ + @JsonProperty("paymentamount") + private String paymentamount; - /** 单据状态 **/ - @JsonProperty("status") - private String status; + /** 收款账户 **/ + @JsonProperty("collectionaccount") + private String collectionaccount; - /** 创建人id **/ - @JsonProperty("creatorUserId") - private String creatorUserId; + /** 收款银行 **/ + @JsonProperty("collectionbank") + private String collectionbank; - /** 创建人名称 **/ - @JsonProperty("creatorUserName") - private String creatorUserName; + /** 申请金额 **/ + @JsonProperty("requestedamount") + private String requestedamount; - /** 创建时间 **/ - @JsonProperty("creatorTime") - private String creatorTime; + /** 应付日期 **/ + @JsonProperty("duedate") + private Long duedate; - /** 修改人id **/ - @JsonProperty("lastModifyUserId") - private String lastModifyUserId; + /** 币别 **/ + @JsonProperty("currency") + private String currency; - /** 修改人名称 **/ - @JsonProperty("lastModifyUserName") - private String lastModifyUserName; + /** 结算类型 **/ + @JsonProperty("settlementtype") + private String settlementtype; - /** 修改时间 **/ - @JsonProperty("lastModifyTime") - private String lastModifyTime; + /** 来源单号 **/ + @JsonProperty("paymentno") + private String paymentno; - /** 部门id **/ - @JsonProperty("departmentId") - private String departmentId; + /** 备注 **/ + @JsonProperty("remark") + private String remark; - /** 组织id **/ - @JsonProperty("orgnizeId") - private String orgnizeId; + /** 单据状态 **/ + @JsonProperty("status") + private String status; + /** 子表数据 **/ + @JsonProperty("payment_item0List") + private List payment_item0List; } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/Payment_item0Model.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/Payment_item0Model.java new file mode 100644 index 00000000..4645cb6d --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/model/payment/Payment_item0Model.java @@ -0,0 +1,73 @@ +package jnpf.payment.model.payment; + +import lombok.Data; +import java.util.List; +import java.util.Date; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.alibaba.fastjson.annotation.JSONField; + +/** + * + * + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-10 + */ +@Data +public class Payment_item0Model { + + /** 付款金额 **/ + @JsonProperty("amount") + private String amount; + + /** 采购订单主表id **/ + @JsonProperty("id") + private String id; + + /** 付款申请子表id **/ + @JsonProperty("paymentdocitemId") + private String paymentdocitemId; + +// /** 申请金额 **/ +// @JsonProperty("amount") +// private String amount; +// +// /** 订单金额 **/ +// @JsonProperty("amount") +// private String amount; + + /** 已付金额 **/ + @JsonProperty("payPrice") + private String payPrice; + + /** 订单编号 **/ + @JsonProperty("documentNo") + private String documentNo; + + /** 合同编码 **/ + @JsonProperty("contractCode") + private String contractCode; + + /** 重量 **/ + @JsonProperty("num") + private String num; + + /** 垫资金额 **/ + @JsonProperty("advanceAmount") + private String advanceAmount; + + /** 税额 **/ + @JsonProperty("rate") + private String rate; + + /** 不含税金额 **/ + @JsonProperty("notAmount") + private String notAmount; + + /** 业务日期 **/ + @JsonProperty("creatorTime") + private Long creatorTime; + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/PaymentService.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/PaymentService.java index d60423c9..0818231f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/PaymentService.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/PaymentService.java @@ -1,17 +1,18 @@ package jnpf.payment.service; +import jnpf.payment.entity.Payment_item0Entity; +import jnpf.payment.service.Payment_item0Service; -import com.baomidou.mybatisplus.extension.service.IService; import jnpf.payment.entity.PaymentEntity; +import com.baomidou.mybatisplus.extension.service.IService; import jnpf.payment.model.payment.PaymentPagination; - -import java.util.List; +import java.util.*; /** * * payment * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ public interface PaymentService extends IService { @@ -30,6 +31,7 @@ public interface PaymentService extends IService { boolean update( String id, PaymentEntity entity); // 子表方法 + List GetPayment_item0List(String id); //列表子表数据方法 } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/Payment_item0Service.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/Payment_item0Service.java index 773d9b08..c3888034 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/Payment_item0Service.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/Payment_item0Service.java @@ -1,15 +1,14 @@ package jnpf.payment.service; -import com.baomidou.mybatisplus.extension.service.IService; import jnpf.payment.entity.Payment_item0Entity; - +import com.baomidou.mybatisplus.extension.service.IService; /** * * jg_payment_item0 * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ public interface Payment_item0Service extends IService { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/PaymentServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/PaymentServiceImpl.java index a3250fae..8d5e7af6 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/PaymentServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/PaymentServiceImpl.java @@ -1,27 +1,36 @@ package jnpf.payment.service.impl; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import jnpf.payment.entity.PaymentEntity; -import jnpf.payment.entity.Payment_item0Entity; +import jnpf.payment.entity.*; import jnpf.payment.mapper.PaymentMapper; -import jnpf.payment.model.payment.PaymentPagination; -import jnpf.payment.service.PaymentService; +import jnpf.payment.service.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jnpf.util.RandomUtil; +import java.math.BigDecimal; +import cn.hutool.core.util.ObjectUtil; import jnpf.permission.model.authorize.AuthorizeConditionModel; -import jnpf.permission.service.AuthorizeService; -import jnpf.util.ServletUtil; -import jnpf.util.StringUtil; -import jnpf.util.UserProvider; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; + +import jnpf.payment.model.payment.PaymentPagination; + +import jnpf.permission.service.AuthorizeService; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; +import com.baomidou.mybatisplus.annotation.TableField; +import java.util.stream.Collectors; + + + + + + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import java.text.SimpleDateFormat; +import jnpf.util.*; +import java.util.*; /** * @@ -29,10 +38,10 @@ import java.util.List; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ @Service -public class PaymentServiceImpl extends ServiceImpl implements PaymentService { +public class PaymentServiceImpl extends ServiceImpl implements PaymentService{ @Autowired @@ -42,6 +51,9 @@ public class PaymentServiceImpl extends ServiceImpl0){ paymentQueryWrapper.lambda().in(PaymentEntity::getId, AllIdList); } @@ -191,11 +198,6 @@ public class PaymentServiceImpl extends ServiceImpl0){ paymentQueryWrapper.lambda().in(PaymentEntity::getId, AllIdList); } @@ -252,6 +254,12 @@ public class PaymentServiceImpl extends ServiceImpl GetPayment_item0List(String id){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId, id); + return payment_item0Service.list(queryWrapper); + } //列表子表数据方法 diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/Payment_item0ServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/Payment_item0ServiceImpl.java index 29347f31..3470f0c6 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/Payment_item0ServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/payment/service/impl/Payment_item0ServiceImpl.java @@ -1,10 +1,30 @@ package jnpf.payment.service.impl; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import jnpf.payment.entity.Payment_item0Entity; +import jnpf.payment.entity.*; import jnpf.payment.mapper.Payment_item0Mapper; -import jnpf.payment.service.Payment_item0Service; +import jnpf.payment.service.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jnpf.util.RandomUtil; +import java.math.BigDecimal; +import cn.hutool.core.util.ObjectUtil; +import jnpf.permission.model.authorize.AuthorizeConditionModel; + + + + + + + + import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import java.text.SimpleDateFormat; +import jnpf.util.*; +import java.util.*; /** * @@ -12,10 +32,10 @@ import org.springframework.stereotype.Service; * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-11 + * 日期: 2023-02-10 */ @Service -public class Payment_item0ServiceImpl extends ServiceImpl implements Payment_item0Service { +public class Payment_item0ServiceImpl extends ServiceImpl implements Payment_item0Service{ } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java index 54e16bda..e81fb045 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/purchaseorder/controller/PurchaseorderController.java @@ -15,8 +15,11 @@ import jnpf.base.UserInfo; import jnpf.base.vo.DownloadVO; import jnpf.config.ConfigValueUtil; import jnpf.exception.DataException; +import jnpf.purchaseback.entity.PurchaseorderEntity; +import jnpf.purchaseback.service.PurchaseorderService; import jnpf.purchaseorder.entity.*; import jnpf.purchaseorder.service.*; +import org.bytedeco.opencv.presets.opencv_core; import org.springframework.transaction.annotation.Transactional; import jnpf.purchaseorder.model.purchaseorder.*; import jnpf.purchaseorder.model.purchaseorder.PurchaseorderPagination; @@ -80,6 +83,8 @@ public class PurchaseorderController { private PaymentdocpoService paymentdocpoService; @Autowired private InvoicesitemService invoicesitemService; + @Autowired + private PurchaseorderService purchaseorderService; /** @@ -88,7 +93,8 @@ public class PurchaseorderController { * @param * @return */ - @PostMapping("pigeonhole") + @PostMapping("/pigeonhole") + @Transactional public ActionResult pigeonhole(@RequestBody PigeonholeModel pigeonholeModel) { PurchaseorderitemEntity purchaseorder = purchaseorderitemService.getById(pigeonholeModel.getId()); if (purchaseorder.getInvoiceAmount().equals(purchaseorder.getAmount()) && purchaseorder.getInvoiceAmount().equals(purchaseorder.getPayPrice())){ @@ -100,6 +106,37 @@ public class PurchaseorderController { } } + /** + * 付款申请 + * + * @param + * @return + */ + @PutMapping("/paymentapply/{ids}") + @Transactional + public ActionResult paymentapply(@PathVariable("ids") String ids) { + String[] idList = ids.split(","); + String supplier = ""; + int i = 0; + for (String id : idList){ + PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(id); + if (!purchaseorderEntity.getStatus().equals("2")){ + return ActionResult.fail("请先完成入库操作"); + } + if (purchaseorderEntity.getPayPrice().equals(purchaseorderEntity.getAmount())){ + return ActionResult.fail("已完成付款"); + } + if (!purchaseorderEntity.getInvoiceAmount().equals(purchaseorderEntity.getAmount())){ + return ActionResult.fail("请先开具发票"); + } + if (i>0 && !supplier.equals(purchaseorderEntity.getSupplierName())){ + return ActionResult.fail("存在多个不同供应商,请重新勾选"); + } + supplier = purchaseorderEntity.getSupplierName(); + i++; + } + return ActionResult.success("付款申请通过"); + } /** * 列表 diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java similarity index 83% rename from SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java rename to SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java index 1a8c6066..d4a4a563 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java @@ -1,55 +1,56 @@ package jnpf.supplier.controller; - import cn.afterturn.easypoi.excel.ExcelExportUtil; import cn.afterturn.easypoi.excel.entity.ExportParams; -import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import jnpf.base.ActionResult; -import jnpf.base.UserInfo; -import jnpf.base.vo.DownloadVO; import jnpf.base.vo.PageListVO; import jnpf.base.vo.PaginationVO; +import jnpf.base.UserInfo; +import jnpf.base.vo.DownloadVO; import jnpf.config.ConfigValueUtil; import jnpf.exception.DataException; -import jnpf.supplier.entity.SupplierEntity; -import jnpf.supplier.entity.SupplierMobileEntity; +import org.springframework.transaction.annotation.Transactional; import jnpf.supplier.model.supplier.*; -import jnpf.supplier.service.SupplierService; +import jnpf.supplier.model.supplier.SupplierPagination; import jnpf.util.*; -import jnpf.util.enums.FileTypeEnum; -import jnpf.util.file.UploadUtil; -import lombok.Cleanup; import lombok.extern.slf4j.Slf4j; +import lombok.Cleanup; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Workbook; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import jnpf.supplier.entity.SupplierMobileEntity; +import jnpf.supplier.service.SupplierMobileService; import org.springframework.web.bind.annotation.*; +import org.springframework.beans.factory.annotation.Autowired; import javax.validation.Valid; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import jnpf.util.GeneraterSwapUtil; +import java.util.*; + +import jnpf.util.file.UploadUtil; +import jnpf.util.enums.FileTypeEnum; /** * - * 供应商档案 + * supplier * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Slf4j @RestController -@Api(tags = "供应商档案" , value = "supplier") +@Api(tags = "supplier" , value = "supplier") @RequestMapping("/api/supplier/Supplier") -public class SupplierController { +public class SupplierMobileController { @Autowired private GeneraterSwapUtil generaterSwapUtil; @@ -61,7 +62,7 @@ public class SupplierController { private UserProvider userProvider; @Autowired - private SupplierService supplierService; + private SupplierMobileService supplierMobileService; @@ -74,9 +75,10 @@ public class SupplierController { */ @PostMapping("/getList") public ActionResult list(@RequestBody SupplierPagination supplierPagination)throws IOException{ - List list= supplierService.getList(supplierPagination); + List list= supplierMobileService.getList(supplierPagination); //处理id字段转名称,若无需转或者为空可删除 for(SupplierMobileEntity entity:list){ + entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0")); } List listVO=JsonUtil.getJsonToList(list,SupplierListVO.class); @@ -103,9 +105,9 @@ public class SupplierController { public ActionResult create(@RequestBody @Valid SupplierCrForm supplierCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); - SupplierEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierEntity.class); + SupplierMobileEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierMobileEntity.class); entity.setId(mainId); - supplierService.save(entity); + supplierMobileService.save(entity); return ActionResult.success("创建成功"); @@ -143,9 +145,10 @@ public class SupplierController { return ActionResult.fail("请选择导出字段"); } SupplierPagination supplierPagination=JsonUtil.getJsonToBean(supplierPaginationExportModel, SupplierPagination.class); - List list= supplierService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType()); + List list= supplierMobileService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 - for(SupplierEntity entity:list){ + for(SupplierMobileEntity entity:list){ + entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0")); } List listVO=JsonUtil.getJsonToList(list,SupplierListVO.class); @@ -173,16 +176,16 @@ public class SupplierController { entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName")); break; case "supplierSiteId" : - entitys.add(new ExcelExportEntity("地点ID" ,"supplierSiteId")); + entitys.add(new ExcelExportEntity("供应商地点ID" ,"supplierSiteId")); break; case "supplierSiteCode" : - entitys.add(new ExcelExportEntity("地点名称" ,"supplierSiteCode")); + entitys.add(new ExcelExportEntity("供应商地点名称" ,"supplierSiteCode")); break; case "companyId" : - entitys.add(new ExcelExportEntity("所属公司编码" ,"companyId")); + entitys.add(new ExcelExportEntity("公司名称" ,"companyId")); break; - case "companyName" : - entitys.add(new ExcelExportEntity("所属公司名称" ,"companyName")); + case "address" : + entitys.add(new ExcelExportEntity("地址" ,"address")); break; case "contactName" : entitys.add(new ExcelExportEntity("联系人" ,"contactName")); @@ -193,9 +196,6 @@ public class SupplierController { case "supplierLevel" : entitys.add(new ExcelExportEntity("供应商等级" ,"supplierLevel")); break; - case "address" : - entitys.add(new ExcelExportEntity("地址" ,"address")); - break; case "status" : entitys.add(new ExcelExportEntity("启用" ,"status")); break; @@ -260,7 +260,7 @@ public class SupplierController { */ @GetMapping("/{id}") public ActionResult info(@PathVariable("id") String id){ - SupplierEntity entity= supplierService.getInfo(id); + SupplierMobileEntity entity= supplierMobileService.getInfo(id); SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class); //子表 @@ -276,7 +276,7 @@ public class SupplierController { */ @GetMapping("/detail/{id}") public ActionResult detailInfo(@PathVariable("id") String id){ - SupplierEntity entity= supplierService.getInfo(id); + SupplierMobileEntity entity= supplierMobileService.getInfo(id); SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class); //子表数据转换 @@ -284,6 +284,7 @@ public class SupplierController { //附表数据转换 //添加到详情表单对象中 + vo.setCompanyId(generaterSwapUtil.comSelectValues(vo.getCompanyId())); vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"0")); return ActionResult.success(vo); @@ -302,10 +303,10 @@ public class SupplierController { @Transactional public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid SupplierUpForm supplierUpForm) throws DataException { UserInfo userInfo=userProvider.get(); - SupplierEntity entity= supplierService.getInfo(id); + SupplierMobileEntity entity= supplierMobileService.getInfo(id); if(entity!=null){ - SupplierEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierEntity.class); - supplierService.update(id, subentity); + SupplierMobileEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierMobileEntity.class); + supplierMobileService.update(id, subentity); return ActionResult.success("更新成功"); }else{ return ActionResult.fail("更新失败,数据不存在"); @@ -323,9 +324,9 @@ public class SupplierController { @DeleteMapping("/{id}") @Transactional public ActionResult delete(@PathVariable("id") String id){ - SupplierEntity entity= supplierService.getInfo(id); + SupplierMobileEntity entity= supplierMobileService.getInfo(id); if(entity!=null){ - supplierService.delete(entity); + supplierMobileService.delete(entity); } return ActionResult.success("删除成功"); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierEntity.java deleted file mode 100644 index 2555be96..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierEntity.java +++ /dev/null @@ -1,108 +0,0 @@ -package jnpf.supplier.entity; - -import com.alibaba.fastjson.annotation.JSONField; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.util.Date; -import com.fasterxml.jackson.annotation.JsonProperty; - - -/** - * - * 供应商档案 - * @版本: V3.2.0 - * @版权: LINKAGE-BOOT - * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 - */ -@Data -@TableName("jg_supplier") -public class SupplierEntity { - - @TableId("ID") - private String id; - - @TableField("CREATOR_USER_ID") - private String creatoruserid; - - @TableField("CREATOR_USER_NAME") - private String creatorusername; - - @TableField("CREATOR_TIME") - private Date creatortime; - - @TableField("LAST_MODIFY_USER_ID") - private String lastmodifyuserid; - - @TableField("LAST_MODIFY_USER_NAME") - private String lastmodifyusername; - - @TableField("LAST_MODIFY_TIME") - private Date lastmodifytime; - - @TableField("DELETE_USER_ID") - private String deleteuserid; - - @TableField("DELETE_USER_NAME") - private String deleteusername; - - @TableField("DELETE_TIME") - private Date deletetime; - - @TableField("DELETE_MARK") - private String deletemark; - - @TableField("SUPPLIER_CODE") - private String supplierCode; - - @TableField("SUPPLIER_NAME") - private String supplierName; - - @TableField("SUPPLIER_SITE_ID") - private String supplierSiteId; - - @TableField("SUPPLIER_SITE_CODE") - private String supplierSiteCode; - - @TableField("COMPANY_ID") - private String companyId; - - @TableField("COMPANY_NAME") - private String companyName; - - @TableField("VAT_REGISTRATION_NUM") - private String vatRegistrationNum; - - -// @TableField("ORGNIZE_ID") -// private String orgnizeId; - - @TableField("orgnize_id") - private String orgId; - - - @TableField("DEPARTMENT_ID") - private String departmentId; - - @TableField("SUPPLY") - private Integer supply; - - @TableField("CONTACT_NAME") - private String contactName; - - @TableField("CONTACT_PHONE") - private String contactPhone; - - @TableField("SUPPLIER_LEVEL") - private String supplierLevel; - - @TableField("ADDRESS") - private String address; - - @TableField("STATUS") - private String status; - -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierMobileEntity.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierMobileEntity.java index 89825adb..bdffe9ce 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierMobileEntity.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierMobileEntity.java @@ -1,52 +1,59 @@ package jnpf.supplier.entity; +import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonProperty; + /** - * @Author: WangChuang - * @Date: 8/2/2023 下午1:37 - * @Description //注释: - * @Version 1.0 + * + * 供应商档案 + * @版本: V3.2.0 + * @版权: LINKAGE-BOOT + * @作者: LINKAGE-BOOT研发团队 + * @日期: 2023-02-13 */ @Data +@TableName("jg_supplier") public class SupplierMobileEntity { @TableId("ID") private String id; @TableField("CREATOR_USER_ID") - private String creatoruserid; + private String creatorUserId; @TableField("CREATOR_USER_NAME") - private String creatorusername; + private String creatorUserName; @TableField("CREATOR_TIME") - private Date creatortime; + private Date creatorTime; @TableField("LAST_MODIFY_USER_ID") - private String lastmodifyuserid; + private String lastModifyUserId; @TableField("LAST_MODIFY_USER_NAME") - private String lastmodifyusername; + private String lastModifyUserName; @TableField("LAST_MODIFY_TIME") - private Date lastmodifytime; + private Date lastModifyTime; @TableField("DELETE_USER_ID") - private String deleteuserid; + private String deleteUserId; @TableField("DELETE_USER_NAME") - private String deleteusername; + private String deleteUserName; @TableField("DELETE_TIME") - private Date deletetime; + private Date deleteTime; @TableField("DELETE_MARK") - private String deletemark; + private String deleteMark; @TableField("SUPPLIER_CODE") private String supplierCode; @@ -69,13 +76,8 @@ public class SupplierMobileEntity { @TableField("VAT_REGISTRATION_NUM") private String vatRegistrationNum; - -// @TableField("ORGNIZE_ID") -// private String orgnizeId; - - @TableField("orgnize_id") - private String orgId; - + @TableField("ORGNIZE_ID") + private String orgnizeId; @TableField("DEPARTMENT_ID") private String departmentId; @@ -98,14 +100,4 @@ public class SupplierMobileEntity { @TableField("STATUS") private String status; - // 收获量 - private Double settlemenSum; - // 净重 - private Double weightSum; - // 扣重 - private Double buckleWeightSum; - // 总重 - private Double grossWeightSum; - // 总额 - private Double salesPriceSum; } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java deleted file mode 100644 index 2c00da98..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package jnpf.supplier.mapper; - - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import jnpf.supplier.entity.SupplierEntity; -import jnpf.supplier.entity.SupplierMobileEntity; -import org.apache.ibatis.annotations.Param; - -/** - * - * 供应商档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -public interface SupplierMapper extends BaseMapper { - IPage getSupplierList(@Param("page") Page page, @Param("ew")Wrapper wrapper); - -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMobileMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMobileMapper.java new file mode 100644 index 00000000..2fa89452 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMobileMapper.java @@ -0,0 +1,17 @@ +package jnpf.supplier.mapper; + + +import jnpf.supplier.entity.SupplierMobileEntity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * + * supplier + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +public interface SupplierMobileMapper extends BaseMapper { + +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierCrForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierCrForm.java index 86f455a0..2a62e7cc 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierCrForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierCrForm.java @@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierCrForm { @@ -27,21 +27,21 @@ public class SupplierCrForm { @JsonProperty("supplierName") private String supplierName; - /** 地点ID **/ + /** 供应商地点ID **/ @JsonProperty("supplierSiteId") private String supplierSiteId; - /** 地点名称 **/ + /** 供应商地点名称 **/ @JsonProperty("supplierSiteCode") private String supplierSiteCode; - /** 所属公司编码 **/ + /** 公司名称 **/ @JsonProperty("companyId") private String companyId; - /** 所属公司名称 **/ - @JsonProperty("companyName") - private String companyName; + /** 地址 **/ + @JsonProperty("address") + private String address; /** 联系人 **/ @JsonProperty("contactName") @@ -55,10 +55,6 @@ public class SupplierCrForm { @JsonProperty("supplierLevel") private String supplierLevel; - /** 地址 **/ - @JsonProperty("address") - private String address; - /** 启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierInfoVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierInfoVO.java index e803e7b8..7ebea007 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierInfoVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierInfoVO.java @@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierInfoVO{ @@ -31,21 +31,21 @@ public class SupplierInfoVO{ @JsonProperty("supplierName") private String supplierName; - /** 地点ID **/ + /** 供应商地点ID **/ @JsonProperty("supplierSiteId") private String supplierSiteId; - /** 地点名称 **/ + /** 供应商地点名称 **/ @JsonProperty("supplierSiteCode") private String supplierSiteCode; - /** 所属公司编码 **/ + /** 公司名称 **/ @JsonProperty("companyId") private String companyId; - /** 所属公司名称 **/ - @JsonProperty("companyName") - private String companyName; + /** 地址 **/ + @JsonProperty("address") + private String address; /** 联系人 **/ @JsonProperty("contactName") @@ -59,10 +59,6 @@ public class SupplierInfoVO{ @JsonProperty("supplierLevel") private String supplierLevel; - /** 地址 **/ - @JsonProperty("address") - private String address; - /** 启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListQuery.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListQuery.java index 0f3fbdae..ed3c4b71 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListQuery.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListQuery.java @@ -10,7 +10,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierListQuery extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListVO.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListVO.java index c2515f36..07d4f4db 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListVO.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierListVO.java @@ -3,15 +3,19 @@ package jnpf.supplier.model.supplier; -import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; +import java.sql.Time; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.math.BigDecimal; /** * * * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierListVO{ @@ -30,24 +34,24 @@ public class SupplierListVO{ private String supplierName; - /** 地点ID **/ + /** 供应商地点ID **/ @JsonProperty("supplierSiteId") private String supplierSiteId; - /** 地点名称 **/ + /** 供应商地点名称 **/ @JsonProperty("supplierSiteCode") private String supplierSiteCode; - /** 所属公司编码 **/ + /** 公司名称 **/ @JsonProperty("companyId") private String companyId; - /** 所属公司名称 **/ - @JsonProperty("companyName") - private String companyName; + /** 地址 **/ + @JsonProperty("address") + private String address; /** 联系人 **/ @@ -65,23 +69,9 @@ public class SupplierListVO{ private String supplierLevel; - /** 地址 **/ - @JsonProperty("address") - private String address; - - /** 启用 **/ @JsonProperty("status") private String status; - // 收获量 - private Double settlemenSum; - // 净重 - private Double weightSum; - // 扣重 - private Double buckleWeightSum; - // 总重 - private Double grossWeightSum; - // 总额 - private Double salesPriceSum; + } \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPagination.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPagination.java index ef76dbc7..e828c9e6 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPagination.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPagination.java @@ -11,7 +11,7 @@ import java.util.List; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierPagination extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPaginationExportModel.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPaginationExportModel.java index be9429ac..a1377267 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPaginationExportModel.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierPaginationExportModel.java @@ -9,7 +9,7 @@ import java.util.*; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierPaginationExportModel extends Pagination { diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierUpForm.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierUpForm.java index 2fbbda69..b1dd31e7 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierUpForm.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/model/supplier/SupplierUpForm.java @@ -15,7 +15,7 @@ import lombok.Data; * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-01-04 + * @日期: 2023-02-13 */ @Data public class SupplierUpForm{ @@ -33,24 +33,24 @@ public class SupplierUpForm{ private String supplierName; - /** 地点ID **/ + /** 供应商地点ID **/ @JsonProperty("supplierSiteId") private String supplierSiteId; - /** 地点名称 **/ + /** 供应商地点名称 **/ @JsonProperty("supplierSiteCode") private String supplierSiteCode; - /** 所属公司编码 **/ + /** 公司名称 **/ @JsonProperty("companyId") private String companyId; - /** 所属公司名称 **/ - @JsonProperty("companyName") - private String companyName; + /** 地址 **/ + @JsonProperty("address") + private String address; /** 联系人 **/ @@ -68,11 +68,6 @@ public class SupplierUpForm{ private String supplierLevel; - /** 地址 **/ - @JsonProperty("address") - private String address; - - /** 启用 **/ @JsonProperty("status") private String status; diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierMobileService.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierMobileService.java new file mode 100644 index 00000000..89eac6a9 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierMobileService.java @@ -0,0 +1,34 @@ +package jnpf.supplier.service; + +import jnpf.supplier.entity.SupplierMobileEntity; +import com.baomidou.mybatisplus.extension.service.IService; +import jnpf.supplier.model.supplier.SupplierPagination; +import java.util.*; +/** + * + * supplier + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +public interface SupplierMobileService extends IService { + + List getList(SupplierPagination supplierPagination); + + List getTypeList(SupplierPagination supplierPagination, String dataType); + + + + SupplierMobileEntity getInfo(String id); + + void delete(SupplierMobileEntity entity); + + void create(SupplierMobileEntity entity); + + boolean update( String id, SupplierMobileEntity entity); + +// 子表方法 + + //列表子表数据方法 +} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierService.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierService.java deleted file mode 100644 index 632e3abe..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierService.java +++ /dev/null @@ -1,42 +0,0 @@ -package jnpf.supplier.service; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import jnpf.supplier.entity.SupplierEntity; -import jnpf.supplier.entity.SupplierMobileEntity; -import jnpf.supplier.model.supplier.SupplierPagination; - -import java.util.List; -/** - * - * 供应商档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -public interface SupplierService extends IService { - - List getList(SupplierPagination supplierPagination); - - - IPagepage(Page page, Wrapper queryWrapper) ; - - List getTypeList(SupplierPagination supplierPagination, String dataType); - - - - SupplierEntity getInfo(String id); - - void delete(SupplierEntity entity); - - void create(SupplierEntity entity); - - boolean update(String id, SupplierEntity entity); - -// 子表方法 - - //列表子表数据方法 -} diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierMobileServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierMobileServiceImpl.java new file mode 100644 index 00000000..a2a11057 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierMobileServiceImpl.java @@ -0,0 +1,223 @@ +package jnpf.supplier.service.impl; + +import jnpf.supplier.entity.*; +import jnpf.supplier.mapper.SupplierMobileMapper; +import jnpf.supplier.service.*; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import cn.hutool.core.util.ObjectUtil; +import jnpf.permission.model.authorize.AuthorizeConditionModel; + + +import jnpf.supplier.model.supplier.SupplierPagination; + +import jnpf.permission.service.AuthorizeService; +import java.lang.reflect.Field; +import com.baomidou.mybatisplus.annotation.TableField; + + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.metadata.IPage; +import org.springframework.beans.factory.annotation.Autowired; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import jnpf.util.*; +import java.util.*; + +/** + * + * supplier + * 版本: V3.2.0 + * 版权: LINKAGE-BOOT + * 作者: LINKAGE-BOOT研发团队 + * 日期: 2023-02-13 + */ +@Service +public class SupplierMobileServiceImpl extends ServiceImpl implements SupplierMobileService { + + + @Autowired + private UserProvider userProvider; + + @Autowired + private AuthorizeService authorizeService; + + + + + + @Override + public List getList(SupplierPagination supplierPagination){ + String userId=userProvider.get().getUserId(); + List AllIdList =new ArrayList(); + int total=0; + int supplierNum =0; + QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); + boolean pcPermission = false; + boolean appPermission = false; + boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); + if(isPc && pcPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); + if (ObjectUtil.isEmpty(supplierObj)){ + return new ArrayList<>(); + } else { + supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierNum++; + } + } + } + if(!isPc && appPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); + if (ObjectUtil.isEmpty(supplierObj)){ + return new ArrayList<>(); + } else { + supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierNum++; + } + + + } + } + if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){ + supplierNum++; + supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierCode,supplierPagination.getSupplierCode()); + } + + if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){ + supplierNum++; + supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierName,supplierPagination.getSupplierName()); + } + + if(AllIdList.size()>0){ + supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList); + } + //排序 + if(StringUtil.isEmpty(supplierPagination.getSidx())){ + supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode); + }else{ + try { + String sidx = supplierPagination.getSidx(); + SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity(); + Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx); + declaredField.setAccessible(true); + String value = declaredField.getAnnotation(TableField.class).value(); + supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + } + if((total>0 && AllIdList.size()>0) || total==0){ + Page page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize()); + IPage userIPage=this.page(page, supplierQueryWrapper); + return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal()); + }else{ + List list = new ArrayList(); + return supplierPagination.setData(list, list.size()); + } + } + @Override + public List getTypeList(SupplierPagination supplierPagination, String dataType){ + String userId=userProvider.get().getUserId(); + List AllIdList =new ArrayList(); + int total=0; + int supplierNum =0; + QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); + boolean pcPermission = false; + boolean appPermission = false; + boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); + if(isPc && pcPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); + if (ObjectUtil.isEmpty(supplierObj)){ + return new ArrayList<>(); + } else { + supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierNum++; + } + } + } + if(!isPc && appPermission){ + if (!userProvider.get().getIsAdministrator()){ + Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); + if (ObjectUtil.isEmpty(supplierObj)){ + return new ArrayList<>(); + } else { + supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierNum++; + } + + + } + } + if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){ + supplierNum++; + supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierCode,supplierPagination.getSupplierCode()); + } + + if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){ + supplierNum++; + supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierName,supplierPagination.getSupplierName()); + } + + if(AllIdList.size()>0){ + supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList); + } + //排序 + if(StringUtil.isEmpty(supplierPagination.getSidx())){ + supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode); + }else{ + try { + String sidx = supplierPagination.getSidx(); + SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity(); + Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx); + declaredField.setAccessible(true); + String value = declaredField.getAnnotation(TableField.class).value(); + supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value); + } catch (NoSuchFieldException e) { + e.printStackTrace(); + } + } + if("0".equals(dataType)){ + if((total>0 && AllIdList.size()>0) || total==0){ + Page page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize()); + IPage userIPage=this.page(page, supplierQueryWrapper); + return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal()); + }else{ + List list = new ArrayList(); + return supplierPagination.setData(list, list.size()); + } + }else{ + return this.list(supplierQueryWrapper); + } + } + + @Override + public SupplierMobileEntity getInfo(String id){ + QueryWrapper queryWrapper=new QueryWrapper<>(); + queryWrapper.lambda().eq(SupplierMobileEntity::getId,id); + return this.getOne(queryWrapper); + } + + @Override + public void create(SupplierMobileEntity entity){ + this.save(entity); + } + + @Override + public boolean update(String id, SupplierMobileEntity entity){ + entity.setId(id); + return this.updateById(entity); + } + @Override + public void delete(SupplierMobileEntity entity){ + if(entity!=null){ + this.removeById(entity.getId()); + } + } + //子表方法 + + //列表子表数据方法 + + +} \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierServiceImpl.java deleted file mode 100644 index 22359a13..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierServiceImpl.java +++ /dev/null @@ -1,243 +0,0 @@ -package jnpf.supplier.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import jnpf.permission.model.authorize.AuthorizeConditionModel; -import jnpf.permission.service.AuthorizeService; -import jnpf.supplier.entity.SupplierEntity; -import jnpf.supplier.entity.SupplierMobileEntity; -import jnpf.supplier.mapper.SupplierMapper; -import jnpf.supplier.model.supplier.SupplierPagination; -import jnpf.supplier.service.SupplierService; -import jnpf.util.ServletUtil; -import jnpf.util.StringUtil; -import jnpf.util.UserProvider; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; - -/** - * - * 供应商档案 - * 版本: V3.2.0 - * 版权: LINKAGE-BOOT - * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-01-04 - */ -@Service -public class SupplierServiceImpl extends ServiceImpl implements SupplierService { - - - @Autowired - private UserProvider userProvider; - - @Autowired - private AuthorizeService authorizeService; - - @Resource - private SupplierMapper supplierMapper; - - - - @Override - public List getList(SupplierPagination supplierPagination){ - String userId=userProvider.get().getUserId(); - List AllIdList =new ArrayList(); - int total=0; - int supplierNum =0; - QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); - boolean pcPermission = false; - boolean appPermission = false; - boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); - if(isPc && pcPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); - if (ObjectUtil.isEmpty(supplierObj)){ - return new ArrayList<>(); - } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; - supplierNum++; - } - } - } - if(!isPc && appPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); - if (ObjectUtil.isEmpty(supplierObj)){ - return new ArrayList<>(); - } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; - supplierNum++; - } - - - } - } - if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){ - supplierNum++; - supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierCode,supplierPagination.getSupplierCode()); - } - - if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){ - supplierNum++; - supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierName,supplierPagination.getSupplierName()); - } - - if(StringUtil.isNotEmpty(supplierPagination.getKeyword())){ - supplierNum++; - supplierQueryWrapper.lambda().and(wq -> { - // 拼接sql - wq.like(SupplierEntity::getSupplierName,supplierPagination.getKeyword()) - .or() - .like(SupplierEntity::getCompanyName,supplierPagination.getKeyword()) - .or() - .like(SupplierEntity::getAddress,supplierPagination.getKeyword()); - }); - } - if(AllIdList.size()>0){ - supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList); - } - //排序 - if(StringUtil.isEmpty(supplierPagination.getSidx())){ - supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getSupplierCode); - }else{ - try { - String sidx = supplierPagination.getSidx(); - SupplierEntity supplierEntity = new SupplierEntity(); - Field declaredField = supplierEntity.getClass().getDeclaredField(sidx); - declaredField.setAccessible(true); - String value = declaredField.getAnnotation(TableField.class).value(); - supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } - } - if((total>0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize()); - IPage userIPage=this.page(page, supplierQueryWrapper); - return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal()); - }else{ - List list = new ArrayList(); - return supplierPagination.setData(list, list.size()); - } - } - - @Override - public IPage page(Page page, Wrapper queryWrapper) { - return supplierMapper.getSupplierList(page,queryWrapper); - } - - @Override - public List getTypeList(SupplierPagination supplierPagination,String dataType){ - String userId=userProvider.get().getUserId(); - List AllIdList =new ArrayList(); - int total=0; - int supplierNum =0; - QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); - boolean pcPermission = false; - boolean appPermission = false; - boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); - if(isPc && pcPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); - if (ObjectUtil.isEmpty(supplierObj)){ - return new ArrayList<>(); - } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; - supplierNum++; - } - } - } - if(!isPc && appPermission){ - if (!userProvider.get().getIsAdministrator()){ - Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier")); - if (ObjectUtil.isEmpty(supplierObj)){ - return new ArrayList<>(); - } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; - supplierNum++; - } - - - } - } - if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){ - supplierNum++; - supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierCode,supplierPagination.getSupplierCode()); - } - - if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){ - supplierNum++; - supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierName,supplierPagination.getSupplierName()); - } - - if(AllIdList.size()>0){ - supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList); - } - //排序 - if(StringUtil.isEmpty(supplierPagination.getSidx())){ - supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getSupplierCode); - }else{ - try { - String sidx = supplierPagination.getSidx(); - SupplierEntity supplierEntity = new SupplierEntity(); - Field declaredField = supplierEntity.getClass().getDeclaredField(sidx); - declaredField.setAccessible(true); - String value = declaredField.getAnnotation(TableField.class).value(); - supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value); - } catch (NoSuchFieldException e) { - e.printStackTrace(); - } - } - if("0".equals(dataType)){ - if((total>0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize()); - IPage userIPage=this.page(page, supplierQueryWrapper); - return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal()); - }else{ - List list = new ArrayList(); - return supplierPagination.setData(list, list.size()); - } - }else{ - return this.list(supplierQueryWrapper); - } - } - - @Override - public SupplierEntity getInfo(String id){ - QueryWrapper queryWrapper=new QueryWrapper<>(); - queryWrapper.lambda().eq(SupplierEntity::getId,id); - return this.getOne(queryWrapper); - } - - @Override - public void create(SupplierEntity entity){ - this.save(entity); - } - - @Override - public boolean update(String id, SupplierEntity entity){ - entity.setId(id); - return this.updateById(entity); - } - @Override - public void delete(SupplierEntity entity){ - if(entity!=null){ - this.removeById(entity.getId()); - } - } - //子表方法 - - //列表子表数据方法 - - -} \ No newline at end of file diff --git a/SC-boot/linkage-scm/src/main/resources/SupplierMapper.xml b/SC-boot/linkage-scm/src/main/resources/SupplierMapper.xml index 66141a71..8c895012 100644 --- a/SC-boot/linkage-scm/src/main/resources/SupplierMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/SupplierMapper.xml @@ -1,6 +1,6 @@ - + diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/supplier/SupplierinvoicesMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/supplier/SupplierinvoicesMapper.xml index 020e532b..c9db71c6 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/supplier/SupplierinvoicesMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/supplier/SupplierinvoicesMapper.xml @@ -1,6 +1,6 @@ - +