diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/controller/MonitoringitemController.java b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/controller/MonitoringitemController.java index 24d15db7..3317990f 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/controller/MonitoringitemController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/controller/MonitoringitemController.java @@ -35,10 +35,7 @@ import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @@ -132,7 +129,12 @@ public class MonitoringitemController { return ActionResult.success("成功"); } - + @ApiOperation("移动端视频流地址获取") + @PostMapping("/getMobileList") + public ActionResult list(){ + List> list = monitoringitemService.getMonitoringitemList(); + return ActionResult.success(list); + } /** * 列表 @@ -141,6 +143,7 @@ public class MonitoringitemController { * @return */ @PostMapping("/getList") + @ApiOperation("列表") public ActionResult list(@RequestBody MonitoringitemPagination monitoringitemPagination)throws IOException{ List list= monitoringitemService.getList(monitoringitemPagination); //处理id字段转名称,若无需转或者为空可删除 diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/mapper/MonitoringitemMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/mapper/MonitoringitemMapper.java index 5b86e2d8..14241b74 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/mapper/MonitoringitemMapper.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/mapper/MonitoringitemMapper.java @@ -4,6 +4,9 @@ package jnpf.monitoringitem.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import jnpf.monitoringitem.entity.MonitoringitemEntity; +import java.util.HashMap; +import java.util.List; + /** * * 监控清单 @@ -13,5 +16,5 @@ import jnpf.monitoringitem.entity.MonitoringitemEntity; * 日期: 2023-02-13 */ public interface MonitoringitemMapper extends BaseMapper { - + List> getMonitorItemList(); } diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/MonitoringitemService.java b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/MonitoringitemService.java index 2fe34944..144420b2 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/MonitoringitemService.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/MonitoringitemService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import jnpf.monitoringitem.entity.MonitoringitemEntity; import jnpf.monitoringitem.model.monitoringitem.MonitoringitemPagination; +import java.util.HashMap; import java.util.List; /** * @@ -20,7 +21,7 @@ public interface MonitoringitemService extends IService { List getTypeList(MonitoringitemPagination monitoringitemPagination,String dataType); - + List> getMonitoringitemList(); MonitoringitemEntity getInfo(String id); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/impl/MonitoringitemServiceImpl.java b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/impl/MonitoringitemServiceImpl.java index 04ab7fce..b2ee908b 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/impl/MonitoringitemServiceImpl.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/monitoringitem/service/impl/MonitoringitemServiceImpl.java @@ -18,8 +18,10 @@ 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.HashMap; import java.util.List; /** @@ -40,7 +42,8 @@ public class MonitoringitemServiceImpl extends ServiceImpl> getMonitoringitemList() { + return monitoringitemMapper.getMonitorItemList(); + } + @Override public MonitoringitemEntity getInfo(String id){ QueryWrapper queryWrapper=new QueryWrapper<>(); diff --git a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java similarity index 66% rename from SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java rename to SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java index d4a4a563..ca061f26 100644 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierMobileController.java +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/controller/SupplierController.java @@ -1,56 +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.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import jnpf.base.ActionResult; -import jnpf.base.vo.PageListVO; -import jnpf.base.vo.PaginationVO; import jnpf.base.UserInfo; import jnpf.base.vo.DownloadVO; +import jnpf.base.vo.PageListVO; +import jnpf.base.vo.PaginationVO; import jnpf.config.ConfigValueUtil; import jnpf.exception.DataException; -import org.springframework.transaction.annotation.Transactional; +import jnpf.supplier.entity.SupplierEntity; +import jnpf.supplier.entity.SupplierMobileEntity; import jnpf.supplier.model.supplier.*; -import jnpf.supplier.model.supplier.SupplierPagination; +import jnpf.supplier.service.SupplierService; import jnpf.util.*; -import lombok.extern.slf4j.Slf4j; +import jnpf.util.enums.FileTypeEnum; +import jnpf.util.file.UploadUtil; import lombok.Cleanup; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Workbook; -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 org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.io.FileOutputStream; import java.io.IOException; -import jnpf.util.GeneraterSwapUtil; -import java.util.*; - -import jnpf.util.file.UploadUtil; -import jnpf.util.enums.FileTypeEnum; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * - * supplier + * 供应商档案 * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-16 */ @Slf4j @RestController -@Api(tags = "supplier" , value = "supplier") -@RequestMapping("/api/supplier/Supplier") -public class SupplierMobileController { +@Api(tags = "供应商档案" , value = "example") +@RequestMapping("/api/example/Supplier") +public class SupplierController { @Autowired private GeneraterSwapUtil generaterSwapUtil; @@ -62,7 +62,7 @@ public class SupplierMobileController { private UserProvider userProvider; @Autowired - private SupplierMobileService supplierMobileService; + private SupplierService supplierService; @@ -75,10 +75,12 @@ public class SupplierMobileController { */ @PostMapping("/getList") public ActionResult list(@RequestBody SupplierPagination supplierPagination)throws IOException{ - List list= supplierMobileService.getList(supplierPagination); + List list= supplierService.getList(supplierPagination); //处理id字段转名称,若无需转或者为空可删除 for(SupplierMobileEntity entity:list){ - entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId())); + Map companyIdMap = new HashMap<>(); + entity.setCompanyId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap)); + entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0")); } List listVO=JsonUtil.getJsonToList(list,SupplierListVO.class); @@ -105,9 +107,10 @@ public class SupplierMobileController { public ActionResult create(@RequestBody @Valid SupplierCrForm supplierCrForm) throws DataException { String mainId =RandomUtil.uuId(); UserInfo userInfo=userProvider.get(); - SupplierMobileEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierMobileEntity.class); + supplierCrForm.setCreatorTime(DateUtil.getNow()); + SupplierEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierEntity.class); entity.setId(mainId); - supplierMobileService.save(entity); + supplierService.save(entity); return ActionResult.success("创建成功"); @@ -145,10 +148,12 @@ public class SupplierMobileController { return ActionResult.fail("请选择导出字段"); } SupplierPagination supplierPagination=JsonUtil.getJsonToBean(supplierPaginationExportModel, SupplierPagination.class); - List list= supplierMobileService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType()); + List list= supplierService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType()); //处理id字段转名称,若无需转或者为空可删除 - for(SupplierMobileEntity entity:list){ - entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId())); + for(SupplierEntity entity:list){ + Map companyIdMap = new HashMap<>(); + entity.setCompanyId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap)); + entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince())); entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0")); } List listVO=JsonUtil.getJsonToList(list,SupplierListVO.class); @@ -172,33 +177,75 @@ public class SupplierMobileController { case "supplierCode" : entitys.add(new ExcelExportEntity("供应商编码" ,"supplierCode")); break; + case "companyId" : + entitys.add(new ExcelExportEntity("所属公司" ,"companyId")); + break; case "supplierName" : entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName")); break; - case "supplierSiteId" : - entitys.add(new ExcelExportEntity("供应商地点ID" ,"supplierSiteId")); + case "country" : + entitys.add(new ExcelExportEntity("国家" ,"country")); break; - case "supplierSiteCode" : - entitys.add(new ExcelExportEntity("供应商地点名称" ,"supplierSiteCode")); + case "supply" : + entitys.add(new ExcelExportEntity("供货指标" ,"supply")); break; - case "companyId" : - entitys.add(new ExcelExportEntity("公司名称" ,"companyId")); - break; - case "address" : - entitys.add(new ExcelExportEntity("地址" ,"address")); + case "province" : + entitys.add(new ExcelExportEntity("省" ,"province")); break; case "contactName" : entitys.add(new ExcelExportEntity("联系人" ,"contactName")); break; + case "supplierLevel" : + entitys.add(new ExcelExportEntity("供应商等级" ,"supplierLevel")); + break; case "contactPhone" : entitys.add(new ExcelExportEntity("联系电话" ,"contactPhone")); break; - case "supplierLevel" : - entitys.add(new ExcelExportEntity("供应商等级" ,"supplierLevel")); + case "enterprise" : + entitys.add(new ExcelExportEntity("供应商性质" ,"enterprise")); + break; + case "address" : + entitys.add(new ExcelExportEntity("地址" ,"address")); + break; + case "classification" : + entitys.add(new ExcelExportEntity("供应商类型" ,"classification")); + break; + case "bank" : + entitys.add(new ExcelExportEntity("开户行" ,"bank")); + break; + case "vatRegistrationNum" : + entitys.add(new ExcelExportEntity("纳税编号" ,"vatRegistrationNum")); + break; + case "bankAccount" : + entitys.add(new ExcelExportEntity("银行账户" ,"bankAccount")); + break; + case "taxCode" : + entitys.add(new ExcelExportEntity("默认税码" ,"taxCode")); + break; + case "payable" : + entitys.add(new ExcelExportEntity("应付科目" ,"payable")); + break; + case "isPurchase" : + entitys.add(new ExcelExportEntity("是否采购" ,"isPurchase")); + break; + case "prepaid" : + entitys.add(new ExcelExportEntity("预付科目" ,"prepaid")); + break; + case "isPayment" : + entitys.add(new ExcelExportEntity("是否付款" ,"isPayment")); break; case "status" : entitys.add(new ExcelExportEntity("启用" ,"status")); break; + case "supplierSiteCode" : + entitys.add(new ExcelExportEntity("供应商地点" ,"supplierSiteCode")); + break; + case "creatorTime" : + entitys.add(new ExcelExportEntity("创建时间" ,"creatorTime")); + break; + case "lastModifyTime" : + entitys.add(new ExcelExportEntity("修改时间" ,"lastModifyTime")); + break; default: break; } @@ -260,8 +307,14 @@ public class SupplierMobileController { */ @GetMapping("/{id}") public ActionResult info(@PathVariable("id") String id){ - SupplierMobileEntity entity= supplierMobileService.getInfo(id); + SupplierEntity entity= supplierService.getInfo(id); SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class); + if(vo.getCreatorTime()!=null){ + vo.setCreatorTime(vo.getCreatorTime()); + } + if(vo.getLastModifyTime()!=null){ + vo.setLastModifyTime(vo.getLastModifyTime()); + } //子表 //副表 @@ -276,7 +329,7 @@ public class SupplierMobileController { */ @GetMapping("/detail/{id}") public ActionResult detailInfo(@PathVariable("id") String id){ - SupplierMobileEntity entity= supplierMobileService.getInfo(id); + SupplierEntity entity= supplierService.getInfo(id); SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class); //子表数据转换 @@ -284,7 +337,9 @@ public class SupplierMobileController { //附表数据转换 //添加到详情表单对象中 - vo.setCompanyId(generaterSwapUtil.comSelectValues(vo.getCompanyId())); + Map companyIdMap = new HashMap<>(); + vo.setCompanyId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",vo.getCompanyId(),companyIdMap)); + vo.setProvince(generaterSwapUtil.provinceData(vo.getProvince())); vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"0")); return ActionResult.success(vo); @@ -303,10 +358,12 @@ public class SupplierMobileController { @Transactional public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid SupplierUpForm supplierUpForm) throws DataException { UserInfo userInfo=userProvider.get(); - SupplierMobileEntity entity= supplierMobileService.getInfo(id); + SupplierEntity entity= supplierService.getInfo(id); if(entity!=null){ - SupplierMobileEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierMobileEntity.class); - supplierMobileService.update(id, subentity); + supplierUpForm.setLastModifyTime(DateUtil.getNow()); + SupplierEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierEntity.class); + subentity.setCreatorTime(entity.getCreatorTime()); + supplierService.update(id, subentity); return ActionResult.success("更新成功"); }else{ return ActionResult.fail("更新失败,数据不存在"); @@ -324,9 +381,9 @@ public class SupplierMobileController { @DeleteMapping("/{id}") @Transactional public ActionResult delete(@PathVariable("id") String id){ - SupplierMobileEntity entity= supplierMobileService.getInfo(id); + SupplierEntity entity= supplierService.getInfo(id); if(entity!=null){ - supplierMobileService.delete(entity); + supplierService.delete(entity); } return ActionResult.success("删除成功"); @@ -337,9 +394,4 @@ public class SupplierMobileController { - - - - - } 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 new file mode 100644 index 00000000..7163904a --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/entity/SupplierEntity.java @@ -0,0 +1,131 @@ +package jnpf.supplier.entity; + +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; + + +/** + * + * 供应商档案 + * @版本: V3.2.0 + * @版权: LINKAGE-BOOT + * @作者: LINKAGE-BOOT研发团队 + * @日期: 2023-02-16 + */ +@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("VAT_REGISTRATION_NUM") + private String vatRegistrationNum; + + @TableField("ORGNIZE_ID") + private String orgnizeId; + + @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; + + @TableField("COUNTRY") + private String country; + + @TableField("PROVINCE") + private String province; + + @TableField("CLASSIFICATION") + private String classification; + + @TableField("ENTERPRISE") + private String enterprise; + + @TableField("BANK") + private String bank; + + @TableField("BANK_ACCOUNT") + private String bankAccount; + + @TableField("TAX_CODE") + private String taxCode; + + @TableField("PAYABLE") + private String payable; + + @TableField("PREPAID") + private String prepaid; + + @TableField("IS_PURCHASE") + private String isPurchase; + + @TableField("IS_PAYMENT") + private String isPayment; + +} 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 bdffe9ce..e7aa3688 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,25 +1,19 @@ 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.math.BigDecimal; import java.util.Date; -import com.fasterxml.jackson.annotation.JsonProperty; - /** - * - * 供应商档案 - * @版本: V3.2.0 - * @版权: LINKAGE-BOOT - * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @Author: WangChuang + * @Date: 16/2/2023 上午10:06 + * @Description //注释: + * @Version 1.0 */ @Data -@TableName("jg_supplier") public class SupplierMobileEntity { @TableId("ID") @@ -70,9 +64,6 @@ public class SupplierMobileEntity { @TableField("COMPANY_ID") private String companyId; - @TableField("COMPANY_NAME") - private String companyName; - @TableField("VAT_REGISTRATION_NUM") private String vatRegistrationNum; @@ -100,4 +91,46 @@ public class SupplierMobileEntity { @TableField("STATUS") private String status; + @TableField("COUNTRY") + private String country; + + @TableField("PROVINCE") + private String province; + + @TableField("CLASSIFICATION") + private String classification; + + @TableField("ENTERPRISE") + private String enterprise; + + @TableField("BANK") + private String bank; + + @TableField("BANK_ACCOUNT") + private String bankAccount; + + @TableField("TAX_CODE") + private String taxCode; + + @TableField("PAYABLE") + private String payable; + + @TableField("PREPAID") + private String prepaid; + + @TableField("IS_PURCHASE") + private String isPurchase; + + @TableField("IS_PAYMENT") + private String isPayment; + + 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/supplier/mapper/SupplierMapper.java b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java new file mode 100644 index 00000000..19e2fc3c --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMapper.java @@ -0,0 +1,23 @@ +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-02-16 + */ +public interface SupplierMapper extends BaseMapper { + + IPage getSupplierList(@Param("page") Page page,@Param("ew") Wrapper queryWrapper); +} 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 deleted file mode 100644 index 2fa89452..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/mapper/SupplierMobileMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -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 2a62e7cc..469b9810 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierCrForm { @@ -23,42 +23,98 @@ public class SupplierCrForm { @JsonProperty("supplierCode") private String supplierCode; + /** 所属公司 **/ + @JsonProperty("companyId") + private String companyId; + /** 供应商名称 **/ @JsonProperty("supplierName") private String supplierName; - /** 供应商地点ID **/ - @JsonProperty("supplierSiteId") - private String supplierSiteId; + /** 国家 **/ + @JsonProperty("country") + private String country; - /** 供应商地点名称 **/ - @JsonProperty("supplierSiteCode") - private String supplierSiteCode; + /** 供货指标 **/ + @JsonProperty("supply") + private String supply; - /** 公司名称 **/ - @JsonProperty("companyId") - private String companyId; - - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省 **/ + @JsonProperty("province") + private String province; /** 联系人 **/ @JsonProperty("contactName") private String contactName; + /** 供应商等级 **/ + @JsonProperty("supplierLevel") + private String supplierLevel; + /** 联系电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 供应商等级 **/ - @JsonProperty("supplierLevel") - private String supplierLevel; + /** 供应商性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + /** 地址 **/ + @JsonProperty("address") + private String address; + + /** 供应商类型 **/ + @JsonProperty("classification") + private String classification; + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; + + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; + + /** 银行账户 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + /** 默认税码 **/ + @JsonProperty("taxCode") + private String taxCode; + + /** 应付科目 **/ + @JsonProperty("payable") + private String payable; + + /** 是否采购 **/ + @JsonProperty("isPurchase") + private String isPurchase; + + /** 预付科目 **/ + @JsonProperty("prepaid") + private String prepaid; + + /** 是否付款 **/ + @JsonProperty("isPayment") + private String isPayment; /** 启用 **/ @JsonProperty("status") private String status; + /** 供应商地点 **/ + @JsonProperty("supplierSiteCode") + private String supplierSiteCode; + + /** 创建时间 **/ + @JsonProperty("creatorTime") + private String creatorTime; + + /** 修改时间 **/ + @JsonProperty("lastModifyTime") + private String lastModifyTime; + } \ No newline at end of file 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 7ebea007..25bfb903 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierInfoVO{ @@ -27,40 +27,98 @@ public class SupplierInfoVO{ @JsonProperty("supplierCode") private String supplierCode; + /** 所属公司 **/ + @JsonProperty("companyId") + private String companyId; + /** 供应商名称 **/ @JsonProperty("supplierName") private String supplierName; - /** 供应商地点ID **/ - @JsonProperty("supplierSiteId") - private String supplierSiteId; + /** 国家 **/ + @JsonProperty("country") + private String country; - /** 供应商地点名称 **/ - @JsonProperty("supplierSiteCode") - private String supplierSiteCode; + /** 供货指标 **/ + @JsonProperty("supply") + private String supply; - /** 公司名称 **/ - @JsonProperty("companyId") - private String companyId; - - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省 **/ + @JsonProperty("province") + private String province; /** 联系人 **/ @JsonProperty("contactName") private String contactName; + /** 供应商等级 **/ + @JsonProperty("supplierLevel") + private String supplierLevel; + /** 联系电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 供应商等级 **/ - @JsonProperty("supplierLevel") - private String supplierLevel; + /** 供应商性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + /** 地址 **/ + @JsonProperty("address") + private String address; + + /** 供应商类型 **/ + @JsonProperty("classification") + private String classification; + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; + + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; + + /** 银行账户 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + /** 默认税码 **/ + @JsonProperty("taxCode") + private String taxCode; + + /** 应付科目 **/ + @JsonProperty("payable") + private String payable; + + /** 是否采购 **/ + @JsonProperty("isPurchase") + private String isPurchase; + + /** 预付科目 **/ + @JsonProperty("prepaid") + private String prepaid; + + /** 是否付款 **/ + @JsonProperty("isPayment") + private String isPayment; /** 启用 **/ @JsonProperty("status") private String status; + /** 供应商地点 **/ + @JsonProperty("supplierSiteCode") + private String supplierSiteCode; + + /** 创建时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("creatorTime") + private Date creatorTime; + + /** 修改时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("lastModifyTime") + private Date lastModifyTime; + } \ No newline at end of file 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 ed3c4b71..054de8be 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierListQuery extends Pagination { @@ -20,6 +20,15 @@ public class SupplierListQuery extends Pagination { /** 供应商名称 */ private String supplierName; + + /** 联系人 */ + private String contactName; + + /** 联系电话 */ + private String contactPhone; + + /** 供应商地点 */ + private String supplierSiteCode; /** * 菜单id */ 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 07d4f4db..623bfc66 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,19 +3,19 @@ package jnpf.supplier.model.supplier; -import lombok.Data; -import java.sql.Time; -import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + import java.math.BigDecimal; +import java.util.Date; /** * * * @版本: V3.2.0 * @版权: LINKAGE-BOOT * @作者: LINKAGE-BOOT研发团队 - * @日期: 2023-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierListVO{ @@ -29,29 +29,29 @@ public class SupplierListVO{ private String supplierCode; + /** 所属公司 **/ + @JsonProperty("companyId") + private String companyId; + + /** 供应商名称 **/ @JsonProperty("supplierName") private String supplierName; - /** 供应商地点ID **/ - @JsonProperty("supplierSiteId") - private String supplierSiteId; + /** 国家 **/ + @JsonProperty("country") + private String country; - /** 供应商地点名称 **/ - @JsonProperty("supplierSiteCode") - private String supplierSiteCode; + /** 供货指标 **/ + @JsonProperty("supply") + private String supply; - /** 公司名称 **/ - @JsonProperty("companyId") - private String companyId; - - - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省 **/ + @JsonProperty("province") + private String province; /** 联系人 **/ @@ -59,14 +59,69 @@ public class SupplierListVO{ private String contactName; + /** 供应商等级 **/ + @JsonProperty("supplierLevel") + private String supplierLevel; + + /** 联系电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 供应商等级 **/ - @JsonProperty("supplierLevel") - private String supplierLevel; + /** 供应商性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + + /** 地址 **/ + @JsonProperty("address") + private String address; + + + /** 供应商类型 **/ + @JsonProperty("classification") + private String classification; + + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; + + + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; + + + /** 银行账户 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + + /** 默认税码 **/ + @JsonProperty("taxCode") + private String taxCode; + + + /** 应付科目 **/ + @JsonProperty("payable") + private String payable; + + + /** 是否采购 **/ + @JsonProperty("isPurchase") + private String isPurchase; + + + /** 预付科目 **/ + @JsonProperty("prepaid") + private String prepaid; + + + /** 是否付款 **/ + @JsonProperty("isPayment") + private String isPayment; /** 启用 **/ @@ -74,4 +129,30 @@ public class SupplierListVO{ private String status; + /** 供应商地点 **/ + @JsonProperty("supplierSiteCode") + private String supplierSiteCode; + + + /** 创建时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("creatorTime") + private Date creatorTime; + + + /** 修改时间 **/ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + @JsonProperty("lastModifyTime") + private Date lastModifyTime; + + + private BigDecimal settlemenSum; + + private BigDecimal weightSum; + + private BigDecimal buckleWeightSum; + + private BigDecimal grossWeightSum; + + private BigDecimal 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 e828c9e6..ed819392 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierPagination extends Pagination { @@ -21,6 +21,15 @@ public class SupplierPagination extends Pagination { /** 供应商名称 */ private String supplierName; + + /** 联系人 */ + private String contactName; + + /** 联系电话 */ + private String contactPhone; + + /** 供应商地点 */ + private String supplierSiteCode; /** * 菜单id */ 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 a1377267..f9e1a0fc 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierPaginationExportModel extends Pagination { @@ -26,4 +26,13 @@ public class SupplierPaginationExportModel extends Pagination { /** 供应商名称 */ private String supplierName; + + /** 联系人 */ + private String contactName; + + /** 联系电话 */ + private String contactPhone; + + /** 供应商地点 */ + private String supplierSiteCode; } \ No newline at end of file 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 b1dd31e7..f0eb34a0 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-02-13 + * @日期: 2023-02-16 */ @Data public class SupplierUpForm{ @@ -28,29 +28,29 @@ public class SupplierUpForm{ private String supplierCode; + /** 所属公司 **/ + @JsonProperty("companyId") + private String companyId; + + /** 供应商名称 **/ @JsonProperty("supplierName") private String supplierName; - /** 供应商地点ID **/ - @JsonProperty("supplierSiteId") - private String supplierSiteId; + /** 国家 **/ + @JsonProperty("country") + private String country; - /** 供应商地点名称 **/ - @JsonProperty("supplierSiteCode") - private String supplierSiteCode; + /** 供货指标 **/ + @JsonProperty("supply") + private String supply; - /** 公司名称 **/ - @JsonProperty("companyId") - private String companyId; - - - /** 地址 **/ - @JsonProperty("address") - private String address; + /** 省 **/ + @JsonProperty("province") + private String province; /** 联系人 **/ @@ -58,14 +58,69 @@ public class SupplierUpForm{ private String contactName; + /** 供应商等级 **/ + @JsonProperty("supplierLevel") + private String supplierLevel; + + /** 联系电话 **/ @JsonProperty("contactPhone") private String contactPhone; - /** 供应商等级 **/ - @JsonProperty("supplierLevel") - private String supplierLevel; + /** 供应商性质 **/ + @JsonProperty("enterprise") + private String enterprise; + + + /** 地址 **/ + @JsonProperty("address") + private String address; + + + /** 供应商类型 **/ + @JsonProperty("classification") + private String classification; + + + /** 开户行 **/ + @JsonProperty("bank") + private String bank; + + + /** 纳税编号 **/ + @JsonProperty("vatRegistrationNum") + private String vatRegistrationNum; + + + /** 银行账户 **/ + @JsonProperty("bankAccount") + private String bankAccount; + + + /** 默认税码 **/ + @JsonProperty("taxCode") + private String taxCode; + + + /** 应付科目 **/ + @JsonProperty("payable") + private String payable; + + + /** 是否采购 **/ + @JsonProperty("isPurchase") + private String isPurchase; + + + /** 预付科目 **/ + @JsonProperty("prepaid") + private String prepaid; + + + /** 是否付款 **/ + @JsonProperty("isPayment") + private String isPayment; /** 启用 **/ @@ -73,4 +128,19 @@ public class SupplierUpForm{ private String status; + /** 供应商地点 **/ + @JsonProperty("supplierSiteCode") + private String supplierSiteCode; + + + /** 创建时间 **/ + @JsonProperty("creatorTime") + private String creatorTime; + + + /** 修改时间 **/ + @JsonProperty("lastModifyTime") + private String lastModifyTime; + + } \ No newline at end of file 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 deleted file mode 100644 index 89eac6a9..00000000 --- a/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierMobileService.java +++ /dev/null @@ -1,34 +0,0 @@ -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 new file mode 100644 index 00000000..b05c9321 --- /dev/null +++ b/SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/SupplierService.java @@ -0,0 +1,44 @@ +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-02-16 + */ +public interface SupplierService extends IService { + + List getList(SupplierPagination supplierPagination); + + List getTypeList(SupplierPagination supplierPagination,String dataType); + + + + SupplierEntity getInfo(String id); + + void delete(SupplierEntity entity); + + void create(SupplierEntity entity); + + boolean update( String id, SupplierEntity entity); + + + + IPage page(Page page, Wrapper queryWrapper) ; +// 子表方法 + + //列表子表数据方法 +} 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/SupplierServiceImpl.java similarity index 57% rename from SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierMobileServiceImpl.java rename to SC-boot/linkage-scm/src/main/java/jnpf/supplier/service/impl/SupplierServiceImpl.java index a2a11057..2804e2ea 100644 --- 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/SupplierServiceImpl.java @@ -1,38 +1,40 @@ 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 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 jnpf.permission.service.AuthorizeService; +import javax.annotation.Resource; 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.*; +import java.util.ArrayList; +import java.util.List; /** * - * supplier + * 供应商档案 * 版本: V3.2.0 * 版权: LINKAGE-BOOT * 作者: LINKAGE-BOOT研发团队 - * 日期: 2023-02-13 + * 日期: 2023-02-16 */ @Service -public class SupplierMobileServiceImpl extends ServiceImpl implements SupplierMobileService { +public class SupplierServiceImpl extends ServiceImpl implements SupplierService { @Autowired @@ -41,7 +43,8 @@ public class SupplierMobileServiceImpl extends ServiceImpl AllIdList =new ArrayList(); int total=0; int supplierNum =0; - QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); + QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); boolean pcPermission = false; boolean appPermission = false; boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); @@ -61,7 +64,7 @@ public class SupplierMobileServiceImpl extends ServiceImpl(); } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierQueryWrapper = (QueryWrapper)supplierObj; supplierNum++; } } @@ -72,7 +75,7 @@ public class SupplierMobileServiceImpl extends ServiceImpl(); } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierQueryWrapper = (QueryWrapper)supplierObj; supplierNum++; } @@ -81,25 +84,40 @@ public class SupplierMobileServiceImpl extends ServiceImpl0){ - supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList); + supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList); } //排序 if(StringUtil.isEmpty(supplierPagination.getSidx())){ - supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode); + supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getCreatorTime); }else{ try { String sidx = supplierPagination.getSidx(); - SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity(); - Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx); + 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); @@ -117,12 +135,12 @@ public class SupplierMobileServiceImpl extends ServiceImpl getTypeList(SupplierPagination supplierPagination, String dataType){ + 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<>(); + QueryWrapper supplierQueryWrapper=new QueryWrapper<>(); boolean pcPermission = false; boolean appPermission = false; boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); @@ -132,7 +150,7 @@ public class SupplierMobileServiceImpl extends ServiceImpl(); } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierQueryWrapper = (QueryWrapper)supplierObj; supplierNum++; } } @@ -143,7 +161,7 @@ public class SupplierMobileServiceImpl extends ServiceImpl(); } else { - supplierQueryWrapper = (QueryWrapper)supplierObj; + supplierQueryWrapper = (QueryWrapper)supplierObj; supplierNum++; } @@ -152,25 +170,40 @@ public class SupplierMobileServiceImpl extends ServiceImpl0){ - supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList); + supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList); } //排序 if(StringUtil.isEmpty(supplierPagination.getSidx())){ - supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode); + supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getCreatorTime); }else{ try { String sidx = supplierPagination.getSidx(); - SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity(); - Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx); + 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); @@ -180,11 +213,11 @@ public class SupplierMobileServiceImpl extends ServiceImpl0 && AllIdList.size()>0) || total==0){ - Page page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize()); - IPage userIPage=this.page(page, supplierQueryWrapper); + 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(); + List list = new ArrayList(); return supplierPagination.setData(list, list.size()); } }else{ @@ -193,24 +226,30 @@ public class SupplierMobileServiceImpl extends ServiceImpl queryWrapper=new QueryWrapper<>(); - queryWrapper.lambda().eq(SupplierMobileEntity::getId,id); + public SupplierEntity getInfo(String id){ + QueryWrapper queryWrapper=new QueryWrapper<>(); + queryWrapper.lambda().eq(SupplierEntity::getId,id); return this.getOne(queryWrapper); } @Override - public void create(SupplierMobileEntity entity){ + public void create(SupplierEntity entity){ this.save(entity); } @Override - public boolean update(String id, SupplierMobileEntity entity){ + public boolean update(String id, SupplierEntity entity){ entity.setId(id); return this.updateById(entity); } + + @Override + public IPage page(Page page, Wrapper queryWrapper) { + return supplierMapper.getSupplierList(page,queryWrapper); + } + @Override - public void delete(SupplierMobileEntity entity){ + public void delete(SupplierEntity entity){ if(entity!=null){ this.removeById(entity.getId()); } diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml index 0e7ecfa8..e35adf66 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/customer/CustomerVMapper.xml @@ -36,7 +36,6 @@ a.enterprise, a.classification, a.country, - a.city, IFNULL( SUM( b.gross_weight ), 0.0000000000 ) settlemenSum, IFNULL( SUM( b.net_weight ), 0.0000000000 ) weightSum, IFNULL( SUM( b.buckle_weight ), 0.0000000000 ) buckleWeightSum, @@ -85,7 +84,6 @@ - diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/monitorItem/Monitoring_itemMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/monitorItem/Monitoring_itemMapper.xml index 4373b705..3ea3fceb 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/monitorItem/Monitoring_itemMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/monitorItem/Monitoring_itemMapper.xml @@ -2,5 +2,29 @@ + + + + + + + + + + + + + + + + + + + + + + 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 c9db71c6..1e078da9 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 @@ - +