Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
yunuo970428 3 years ago
parent
commit
7f719ba27c
  1. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java
  2. 7
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.xml
  3. 7
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java
  4. 51
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java
  5. 49
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java
  6. 40
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java
  7. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java
  8. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml
  9. 4
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java
  10. 14
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java
  11. 9
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleCarInventoryListPageQuery.java
  12. 9
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryDto.java
  13. 3
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryInfoVo.java
  14. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryListPageVo.java
  15. 3
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/AppScmVehiclePatrolinspectionPageVo.java
  16. 25
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/ScmVehiclePatrolinspection.java
  17. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionFeign.java
  18. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheet.java
  19. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDetailsVo.java
  20. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDto.java
  21. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetFeign.java
  22. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionFeign.java
  23. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionFeignFallback.java
  24. 35
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthInfoVo.java
  25. 9
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthQuery.java
  26. 24
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java
  27. 87
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppVehInventorymonthVo.java
  28. 13
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppVinAndRemarksVo.java
  29. 6
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java
  30. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeignFallback.java
  31. 26
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/AppReportDto.java
  32. 17
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/RecipientListDto.java
  33. 14
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportDto.java
  34. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeign.java
  35. 5
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeignFallback.java
  36. 20
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthInfoVo.java
  37. 39
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthQuery.java
  38. 35
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthVo.java
  39. 64
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonth.java
  40. 65
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthDetailsVo.java
  41. 65
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthDto.java
  42. 97
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthFeign.java
  43. 87
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthFeignFallback.java
  44. 63
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthQuery.java
  45. 65
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthVo.java
  46. 30
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/VehPatrolinspectionmonthVo.java
  47. 62
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreport.java
  48. 63
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportDetailsVo.java
  49. 63
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportDto.java
  50. 78
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportFeign.java
  51. 72
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportFeignFallback.java
  52. 61
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportQuery.java
  53. 63
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportVo.java
  54. 16
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.java
  55. 72
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.xml
  56. 207
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java
  57. 6
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.java
  58. 14
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.xml
  59. 14
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionService.java
  60. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetMapper.xml
  61. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetService.java
  62. 5
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionRest.java
  63. 33
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionService.java
  64. 33
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.java
  65. 53
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml
  66. 17
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthRest.java
  67. 151
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java
  68. 5
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportRest.java
  69. 228
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportService.java
  70. 72
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.java
  71. 42
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.xml
  72. 120
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthRest.java
  73. 254
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthService.java
  74. 65
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportMapper.java
  75. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportMapper.xml
  76. 100
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportRest.java
  77. 110
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportService.java
  78. 10
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinspectionFeign.java
  79. 10
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinspectionFeignFallback.java
  80. 19
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthInfoVo.java
  81. 38
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthQuery.java
  82. 33
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthVo.java
  83. 14
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeign.java
  84. 15
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeignFallback.java
  85. 5
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageQuery.java
  86. 16
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/ReportListDto.java
  87. 7
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/StayInventoryDto.java
  88. 3
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/StayInventoryInfoVo.java
  89. 33
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthInfoVo.java
  90. 34
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthQuery.java
  91. 47
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthVo.java
  92. 21
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventoryreportDto.java
  93. 8
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/baseInfo/AppScmBaseInfoService.java
  94. 10
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inspection/AppScmVehiclePatrolinspectionRest.java
  95. 35
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inspection/AppScmVehiclePatrolinspectionService.java
  96. 15
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryRest.java
  97. 50
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryService.java

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.java

@ -45,4 +45,6 @@ public interface BusVehicleApplyMapper extends BaseMapper<BusVehicleApply> {
int abandonApply(@Param("sidsList") List<String> sidsList);
int selectByNodeState(String join);
int selectCountBySids(String join);
}

7
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyMapper.xml

@ -94,4 +94,11 @@
where nodeState &lt;&gt; '已办结'
and find_in_set(sid, #{join})
</select>
<select id="selectCountBySids" resultType="int">
select count(*)
from bus_vehicle_apply ba
left join base_manufactor_subscription bs on ba.applicationCode = bs.proSchAppNo
where bs.state = 1 and find_in_set(sid, #{join})
</select>
</mapper>

7
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java

@ -831,7 +831,12 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
//查询该sid中是否有流程不是已办结的
int count = baseMapper.selectByNodeState(StringUtils.join(sids, ","));
if (count > 0) {
return rb.setMsg("作废的数据中包含流程未完结的数据,不允许作废");
return rb.setMsg("选择作废的数据中包含流程未完结的数据,不允许作废");
}
//查询需要作废的数据中是否包含已认款的
int counts = baseMapper.selectCountBySids(StringUtils.join(sids, ","));
if(counts>0){
return rb.setMsg("选择作废的数据中包含已认款的数据,不允许作废");
}
List<String> sidsList = Arrays.asList(sids);
int i = baseMapper.abandonApply(sidsList);

51
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java

@ -5,6 +5,8 @@ import com.yxt.anrui.portal.api.sysorganization.*;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo;
import com.yxt.anrui.portal.biz.sysstaffinfo.SysStaffinfoService;
import com.yxt.anrui.portal.biz.sysstafforg.SysStaffOrgService;
import com.yxt.anrui.portal.biz.sysuser.SysUserService;
import com.yxt.common.base.config.RedisUtil;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.utils.QRCodeUtil;
import com.yxt.common.base.utils.StringUtils;
@ -19,10 +21,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import static java.util.stream.Collectors.toList;
/**
* Project: anrui_portal(门户建设) <br/>
@ -50,6 +51,10 @@ public class SysOrganizationRest implements SysOrganizationFeign {
private SysStaffinfoService sysStaffinfoService;
@Autowired
private FileUploadComponent fileUploadComponent;
@Autowired
private SysUserService sysUserService;
@Autowired
private RedisUtil redisUtil;
@Override
public ResultBean<PagerVo<SysOrganizationVo>> listPage(@RequestBody PagerQuery<SysOrganizationQuery> pq) {
@ -98,6 +103,8 @@ public class SysOrganizationRest implements SysOrganizationFeign {
@Transactional(rollbackFor = Exception.class)
public ResultBean update(SysOrganizationDto dto, String sid) {
ResultBean rb = ResultBean.fireFail();
//查询该机构下的所有分管人员
List<String> stringList = sysStaffOrgService.selectByOrgSid(sid);
//根据组织sid查询组织信息
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(sid);
if (sysOrganization == null) {
@ -131,6 +138,42 @@ public class SysOrganizationRest implements SysOrganizationFeign {
}
}
sysOrganizationService.updateBySid(dto.toMap(), sid);
//==========================添加清空变化的用户的token
//查询分管人员
List<String> stringList1 = new ArrayList<>();
List<String> reduce1 = new ArrayList<>();
if(StringUtils.isNotBlank(fgStaffSid)){
stringList1 = Arrays.asList(fgStaffSid.split(","));
reduce1 = stringList1.stream().filter(item -> !stringList.contains(item)).collect(toList());
}else{
reduce1 = stringList;
}
String orgSid1 = sysStaffOrgService.getOrgByOrgSid(sid);
if(reduce1.size()>0){
for (String s : reduce1){
//查询该人员的组织机构list
List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgService.selectByStaffS(s);
List<String> orgList = new ArrayList<>();
if (sysStaffOrgVos.size() > 0) {
for (SysStaffOrgVo vv : sysStaffOrgVos) {
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization ss = sysOrganizationService.fetchBySid(orgSid);
if (ss != null) {
orgList.add(orgSid);
} else {
continue;
}
}
}
if(!orgList.contains(orgSid1)){
//根据staffSid查询token
String token = sysUserService.selectByStaffsid(s).getToken();
//清空该token
redisUtil.remove(token);
}
}
}
return rb.success();
}

49
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationService.java

@ -14,6 +14,7 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo;
import com.yxt.anrui.portal.biz.sysstaffinfo.SysStaffinfoService;
import com.yxt.anrui.portal.biz.sysstafforg.SysStaffOrgService;
import com.yxt.anrui.portal.biz.sysuser.SysUserService;
import com.yxt.common.base.config.RedisUtil;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
@ -27,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import static java.util.stream.Collectors.toList;
/**
* Project: anrui_portal(门户建设) <br/>
* File: SysOrganizationService.java <br/>
@ -52,6 +55,8 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa
private BaseVehicleBrandFeign baseVehicleBrandFeign;
@Autowired
private SysStaffinfoService sysStaffInfoService;
@Autowired
private RedisUtil redisUtil;
public PagerVo<SysOrganization> listPage(PagerQuery<SysOrganizationQuery> pq) {
SysOrganizationQuery query = pq.getParams();
@ -163,14 +168,28 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa
if ("1".equals(manageType)) {
//查询是否有员工信息,如果有的话,删除关联关系
sysStaffOrgService.deleteByStaffSidAndType(entity.getOrgSidPath(), sid, "3");
}else{
} else {
int count = sysStaffOrgService.selectByStaffAndOrg(entity.getOrgSidPath(), sid, "3");
SysStaffinfo sysStaffinfo = sysStaffInfoService.fetchBySid(sid);
if(count>0){
return rb.setMsg(sysStaffinfo.getName()+"已在本部门,不能设置分管");
if (count > 0) {
return rb.setMsg(sysStaffinfo.getName() + "已在本部门,不能设置分管");
}
}
//查询该人员的组织机构list
List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgService.selectByStaffS(sid);
List<String> orgList = new ArrayList<>();
if (sysStaffOrgVos.size() > 0) {
for (SysStaffOrgVo vv : sysStaffOrgVos) {
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization sysOrganization = fetchBySid(orgSid);
if (sysOrganization != null) {
orgList.add(orgSid);
} else {
continue;
}
}
}
//添加员工与组织的关联关系
SysStaffOrg sysStaffOrg = new SysStaffOrg();
sysStaffOrg.setManageType(manageType);
@ -193,7 +212,31 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa
}
}
sysStaffOrgService.save(sysStaffOrg);
//==========================添加清空变化的用户的token
List<SysStaffOrgVo> sysStaffOrgVos1 = sysStaffOrgService.selectByStaffS(sid);
List<String> orgList1 = new ArrayList<>();
if (sysStaffOrgVos1.size() > 0) {
for (SysStaffOrgVo vv : sysStaffOrgVos1) {
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization sysOrganization = fetchBySid(orgSid);
if (sysOrganization != null) {
orgList1.add(orgSid);
} else {
continue;
}
}
}
List<String> reduce1 = orgList1.stream().filter(item -> !orgList.contains(item)).collect(toList());
if (reduce1.size() > 0) {
//根据staffSid查询token
String token = sysUserService.selectByStaffsid(sid).getToken();
//清空该token
redisUtil.remove(token);
}
}
return rb.success();
}

40
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstaffinfo/SysStaffinfoService.java

@ -12,6 +12,7 @@ import com.yxt.anrui.portal.api.sysstaffinfo.app.AppSysStaffVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgDetailsVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgDto;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgVo;
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPost;
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPostDetailsVo;
import com.yxt.anrui.portal.api.sysstaffpost.SysStaffPostDto;
@ -24,6 +25,7 @@ import com.yxt.anrui.portal.biz.sysstafforg.SysStaffOrgService;
import com.yxt.anrui.portal.biz.sysstaffpost.SysStaffPostService;
import com.yxt.anrui.portal.biz.sysuser.SysUserService;
import com.yxt.anrui.portal.biz.sysuserrole.SysUserRoleService;
import com.yxt.common.base.config.RedisUtil;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.Encodes;
@ -39,6 +41,8 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import static java.util.stream.Collectors.toList;
/**
* Project: anrui_portal(门户建设) <br/>
* File: SysStaffinfoService.java <br/>
@ -71,6 +75,8 @@ public class SysStaffinfoService extends MybatisBaseService<SysStaffinfoMapper,
private SysUserRoleService sysUserRoleService;
@Autowired
private SysRoleService sysRoleService;
@Autowired
private RedisUtil redisUtil;
public List<SysStaffinfoAppContactsVo> selectAppContactsList() {
List<SysStaffinfoAppContactsVo> list = baseMapper.selectAppContactsList();
@ -413,6 +419,20 @@ public class SysStaffinfoService extends MybatisBaseService<SysStaffinfoMapper,
*/
public ResultBean updateStaffInfo(SysStaffinfoDto dto, String sid) {
ResultBean rb = ResultBean.fireFail();
//查询该人员的组织机构list
List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgService.selectByStaffS(sid);
List<String> orgList = new ArrayList<>();
if (sysStaffOrgVos.size() > 0) {
for (SysStaffOrgVo vv : sysStaffOrgVos) {
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(orgSid);
if (sysOrganization != null) {
orgList.add(orgSid);
} else {
continue;
}
}
}
//根据员工sid查询员工的信息
SysStaffinfo sysStaffinfo = fetchBySid(sid);
if (sysStaffinfo == null) {
@ -519,6 +539,26 @@ public class SysStaffinfoService extends MybatisBaseService<SysStaffinfoMapper,
if (!isUpdate) {
return rb.setMsg("更新员工信息失败");
}
List<SysStaffOrgVo> sysStaffOrgVos1 = sysStaffOrgService.selectByStaffS(sid);
List<String> orgList1 = new ArrayList<>();
if (sysStaffOrgVos1.size() > 0) {
for (SysStaffOrgVo vv : sysStaffOrgVos1) {
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(orgSid);
if (sysOrganization != null) {
orgList1.add(orgSid);
} else {
continue;
}
}
}
List<String> reduce1 = orgList.stream().filter(item -> !orgList1.contains(item)).collect(toList());
if (reduce1.size() > 0) {
//根据staffSid查询token
String token = sysUserService.selectByStaffsid(sid).getToken();
//清空该token
redisUtil.remove(token);
}
return rb.success().setMsg("更新员工信息成功");
}

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.java

@ -100,4 +100,6 @@ public interface SysStaffOrgMapper extends BaseMapper<SysStaffOrg> {
int deleteByStaffSidAndType(@Param("sid") String sid, @Param("staffSid") String zgStaffSid, @Param("type") String type);
List<SysStaffOrgVo> selectByStaffS(String staffSid);
List<String> selectByOrgSid(String sid);
}

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgMapper.xml

@ -88,4 +88,8 @@
from sys_staff_org
where staffSid = #{staffSid}
</select>
<select id="selectByOrgSid" resultType="java.lang.String">
select staffSid from sys_staff_org where orgSid = #{sid} and manageType = 2
</select>
</mapper>

4
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysstafforg/SysStaffOrgService.java

@ -277,4 +277,8 @@ public class SysStaffOrgService extends MybatisBaseService<SysStaffOrgMapper, Sy
public List<SysStaffOrgVo> selectByStaffS(String staffSid) {
return baseMapper.selectByStaffS(staffSid);
}
public List<String> selectByOrgSid(String sid) {
return baseMapper.selectByOrgSid(sid);
}
}

14
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java

@ -347,10 +347,11 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
//根据orgSidPath查询分公司sid=====
String orgSid = sysStaffOrgService.getOrgByOrgSid(sysStaffOrgVo.getOrgSid());
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(orgSid);
if(sysOrganization != null){
if (sysOrganization != null) {
userInfoOneVo.setDefaultOrgPathName(sysOrganization.getName());
userInfoOneVo.setDefaultOrgPath(sysStaffOrgVo.getOrgSidPath());
}else{
// userInfoOneVo.setDefaultOrgPath(sysStaffOrgVo.getOrgSidPath());
userInfoOneVo.setDefaultOrgPath(sysOrganization.getSid());
} else {
userInfoOneVo.setDefaultOrgPathName("暂无组织机构");
}
}
@ -368,9 +369,12 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
OrgList orgList1 = new OrgList();
String orgSid = sysStaffOrgService.getOrgByOrgSid(vv.getOrgSid());
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(orgSid);
if(sysOrganization != null){
if (sysOrganization != null) {
orgList1.setOrgName(sysOrganization.getName());
orgList1.setOrgPath(vv.getOrgSidPath());
// orgList1.setOrgPath(vv.getOrgSidPath());
orgList1.setOrgPath(sysOrganization.getSid());
}else{
continue;
}
orgList.add(orgList1);
}

9
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleCarInventoryListPageQuery.java

@ -12,7 +12,7 @@ public class AppScmVehicleCarInventoryListPageQuery implements Query {
private String userSid;
@ApiModelProperty("优先匹配车架号 盘库人员")
private String name;
private String names;
@ApiModelProperty("时间段 示例 2020-02-01至2022-03-31")
private String date;
@ -28,8 +28,11 @@ public class AppScmVehicleCarInventoryListPageQuery implements Query {
@ApiModelProperty("存放地点sid")
private String warehouseSid;
// @ApiModelProperty("盘库状态 通过1 不通过 2")
// private String state;
@ApiModelProperty("月度盘库sid")
private String reportSid;
@ApiModelProperty("盘库状态 通过1 不通过 2")
private String state;
@ApiModelProperty("使用组织分公司sid")
private String useOrgSid;

9
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryDto.java

@ -51,11 +51,14 @@ import java.util.List;
@ApiModel(value = "待盘库记录 数据传输对象", description = "待盘库记录 数据传输对象")
public class AppScmVehicleStayInventoryDto implements Dto {
@ApiModelProperty(value = "盘库sid")
@ApiModelProperty(value = "盘库sid")
private String sid;
@ApiModelProperty(value = "车架号")
private String mainSid;
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("月度盘库sid")
private String mainSid; // 月度盘库sid
@ApiModelProperty(value = "存放地点")
private String location;

3
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryInfoVo.java

@ -59,6 +59,9 @@ public class AppScmVehicleStayInventoryInfoVo implements Vo {
@ApiModelProperty("车架号")
private String vin;
@ApiModelProperty("月度盘库sid")
private String mainSid;
@ApiModelProperty("存放地点")
private String warehouse;

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehicleinventory/AppScmVehicleStayInventoryListPageVo.java

@ -15,9 +15,15 @@ public class AppScmVehicleStayInventoryListPageVo implements Vo {
@ApiModelProperty("sid")
private String sid;
@ApiModelProperty("月度盘库sid")
private String mainSid;
@ApiModelProperty("车架号")
private String vin;
@ApiModelProperty("创建组织sid")
private String createOrgSid;
@ApiModelProperty("存放地点")
private String warehouse;

3
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/AppScmVehiclePatrolinspectionPageVo.java

@ -14,6 +14,9 @@ public class AppScmVehiclePatrolinspectionPageVo implements Vo {
@ApiModelProperty("车架号")
private String vin;
@ApiModelProperty("月度管理sid")
private String mainSid;
@ApiModelProperty("最新巡检日期")
private String newInspectionDate;

25
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/ScmVehiclePatrolinspection.java

@ -49,24 +49,25 @@ import lombok.Data;
@TableName("scm_vehicle_patrolinspection")
public class ScmVehiclePatrolinspection extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("车架号")
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("月度管理sid")
private String mainSid; // 车架号
@ApiModelProperty("存放地点sid")
@ApiModelProperty("存放地点sid")
private String locationSid; // 存放地点sid
@ApiModelProperty("存放地点")
@ApiModelProperty("存放地点")
private String location; // 存放地点
@ApiModelProperty("合格证(有/无)")
private String certificate; // 合格证(有/无)
@ApiModelProperty("巡检日期")
@ApiModelProperty("巡检日期")
private String patrolInspectionDate; // 巡检日期
@ApiModelProperty("巡检人员")
@ApiModelProperty("巡检人员")
private String patrolInspectionName; // 巡检人员
@ApiModelProperty("巡检状态(通过/不通过)")
@ApiModelProperty("巡检状态(通过/不通过)")
private String patrolInspectionState; // 巡检状态(通过/不通过)
@ApiModelProperty("创建组织")
@ApiModelProperty("巡检状态(通过/不通过)")
private String patrolInspectionStateKey; // 巡检状态(通过/不通过)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("使用组织")
private String useOrgName; // 使用组织
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
}

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionFeign.java

@ -82,7 +82,7 @@ public interface ScmVehiclePatrolinspectionFeign {
@ApiOperation("手机端-巡检详情")
@PostMapping("/getInspectionInfo/{recordSid}")
@ResponseBody
public ResultBean<AppScmVehiclePatroVo> getInspectionInfo(@PathVariable("recordSid")String recordSid);
public ResultBean<AppScmVehiclePatroVo> getInspectionInfo(@PathVariable("recordSid") String recordSid);
}

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheet.java

@ -49,9 +49,9 @@ import lombok.Data;
@TableName("scm_vehicle_patrolinspectionsheet")
public class ScmVehiclePatrolinspectionsheet extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("主表sid")
private String patrolInspectionSid; // 主表sid
@ApiModelProperty("车架号")
private String vinNo; // 主表sid
@ApiModelProperty("巡检记录sid")
private String mainSid; // 车架号
@ApiModelProperty("车型sid")
private String modelSid; // 车型sid

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDetailsVo.java

@ -51,10 +51,10 @@ import java.util.List;
@ApiModel(value = "巡检单 视图数据详情", description = "巡检单 视图数据详情")
public class ScmVehiclePatrolinspectionsheetDetailsVo implements Vo {
private String sid;
@ApiModelProperty("主表sid")
private String patrolInspectionSid; // 主表sid
@ApiModelProperty("车架号")
private String mainSid; // 车架号
private String vinNo; // 车架号
@ApiModelProperty("巡检记录sid")
private String mainSid; //
@ApiModelProperty("车型sid")
private String modelSid; // 车型sid
@ApiModelProperty("车型")

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDto.java

@ -52,10 +52,9 @@ import java.util.List;
public class ScmVehiclePatrolinspectionsheetDto implements Dto {
private String sid;
@ApiModelProperty("主表sid")
private String patrolInspectionSid; // 主表sid
@ApiModelProperty("车架号")
private String vinNo; // 车架号
@ApiModelProperty("巡检记录sid")
private String mainSid; // 车架号
@ApiModelProperty("车型sid")
private String modelSid; // 车型sid

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetFeign.java

@ -84,7 +84,7 @@ public interface ScmVehiclePatrolinspectionsheetFeign {
@ResponseBody
public ResultBean<AppScmVehiclePatrolinspectionsheetInfoVo> getInspection(@PathVariable("recordSid") String recordSid);
@ApiOperation("手机端-保存巡检操作")
@ApiOperation("手机端-提交巡检操作")
@PostMapping("/saveInspection")
@ResponseBody
public ResultBean saveInspection(@RequestBody ScmVehiclePatrolinspectionsheetDto dto);

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionFeign.java

@ -74,11 +74,6 @@ public interface ScmVehicleStayPatrolinspectionFeign {
@ResponseBody
public ResultBean<ScmVehicleStayPatrolinspectionDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("手机端-判断是否生成巡检记录")
@GetMapping("/getInspectionRecords/{userSid}")
@ResponseBody
public ResultBean getInspectionRecords(@PathVariable("userSid") String userSid);
@ApiOperation("手机端-获取巡检列表")
@PostMapping("/getInspectionList")

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionFeignFallback.java

@ -70,11 +70,6 @@ public class ScmVehicleStayPatrolinspectionFeignFallback implements ScmVehicleSt
return rb.setMsg("接口anrui_scm/scmvehiclestaypatrolinspection/fetchDetailsBySid无法访问");
}
@Override
public ResultBean getInspectionRecords(String userSid) {
return null;
}
@Override
public ResultBean<PagerVo<AppScmVehicleStayPatrolinspectionPageVo>> getInspectionList(PagerQuery<AppScmVehicleStayPatrolinspectionPageQuery> pagerQuery) {
return null;

35
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthInfoVo.java

@ -0,0 +1,35 @@
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppScmVehInventorymonthInfoVo implements Vo {
private static final long serialVersionUID = -8077170646957590520L;
@ApiModelProperty("本次应盘数量")
private String totalNumber;
@ApiModelProperty("实际盘库数量")
private String actualNumber;
@ApiModelProperty("正常数量")
private String normalNumber;
@ApiModelProperty("盘盈数量")
private String profitNumber;
@ApiModelProperty("盘亏数量")
private String lossNumber;
@ApiModelProperty("盘损数量")
private String damageNumber;
@ApiModelProperty("盘盈备注")
private String profitRemarks;
@ApiModelProperty("盘亏备注")
private String lossRemarks;
@ApiModelProperty("盘损备注")
private String damageRemarks;
@ApiModelProperty("接收人")
private String recipient;
@ApiModelProperty("创建日期")
private String date;
}

9
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthQuery.java

@ -26,6 +26,7 @@
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -61,4 +62,12 @@ public class AppScmVehInventorymonthQuery implements Query {
@ApiModelProperty("使用组织名称")
private String useOrgSid;
@ApiModelProperty("盘库开始日期")
@JsonProperty("InventStartDate")
private String InventStartDate;
@ApiModelProperty("盘库结束日期")
@JsonProperty("InventEndDate")
private String InventEndDate;
}

24
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppScmVehInventorymonthVo.java

@ -49,16 +49,23 @@ import lombok.Data;
public class AppScmVehInventorymonthVo implements Vo {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
@ApiModelProperty("生成报告状态")
private String state;
@ApiModelProperty("编号(yyyyMMdd)")
private String reportId; // 编号(yyyyMMdd)
@ApiModelProperty("创建时间")
private String date; //
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建人")
private String name;
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@ApiModelProperty("剩余盘库记录数量")
private String surplusNumber;
@ -72,9 +79,10 @@ public class AppScmVehInventorymonthVo implements Vo {
private String profitNumber;
@ApiModelProperty("实盘数量")
private String actualNumber;
@ApiModelProperty("正常数量")
private String normalNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

87
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppVehInventorymonthVo.java

@ -0,0 +1,87 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventorymonthVo.java <br/>
* Class: com.yxt.anrui.scm.api.api.scmvehinventorymonth.ScmVehInventorymonthVo <br/>
* Description: 月度盘库 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-16 15:52:05 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度盘库 视图数据对象", description = "月度盘库 视图数据对象")
public class AppVehInventorymonthVo implements Vo {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建时间")
private String date; //
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建人")
private String name;
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@ApiModelProperty("剩余盘库记录数量")
private int surplusNumber;
@ApiModelProperty("盘库记录总数数量")
private int totalNumber;
@ApiModelProperty("盘亏数量")
private int lossNumber;
@ApiModelProperty("盘损数量")
private int damageNumber;
@ApiModelProperty("盘盈数量")
private int profitNumber;
@ApiModelProperty("实盘数量")
private int actualNumber;
@ApiModelProperty("正常数量")
private int normalNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

13
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/AppVinAndRemarksVo.java

@ -0,0 +1,13 @@
package com.yxt.anrui.scm.api.scmvehinventorymonth;
import com.yxt.common.core.vo.Vo;
import lombok.Data;
@Data
public class AppVinAndRemarksVo implements Vo {
private static final long serialVersionUID = -7810009366140799044L;
private String vinNo;
private String remarks;
}

6
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeign.java

@ -88,6 +88,8 @@ public interface ScmVehInventorymonthFeign {
@ResponseBody
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(@RequestBody PagerQuery<AppScmVehInventorymonthQuery> pagerQuery);
@ApiOperation("手机端-获取盘库报告")
@GetMapping("/getCarInventoryReport/{sid}")
@ResponseBody
public ResultBean<AppScmVehInventorymonthInfoVo> getCarInventoryReport(@PathVariable("sid") String sid);
}

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventorymonth/ScmVehInventorymonthFeignFallback.java

@ -79,4 +79,9 @@ public class ScmVehInventorymonthFeignFallback implements ScmVehInventorymonthFe
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) {
return null;
}
@Override
public ResultBean<AppScmVehInventorymonthInfoVo> getCarInventoryReport(String sid) {
return null;
}
}

26
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/AppReportDto.java

@ -0,0 +1,26 @@
package com.yxt.anrui.scm.api.scmvehinventoryreport;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.lang.ref.PhantomReference;
import java.util.List;
@Data
public class AppReportDto implements Dto {
private static final long serialVersionUID = 7057300987973700285L;
@ApiModelProperty("盘库sid")
private String mainSid;
@ApiModelProperty("消息内容")
private String msgContent;
@ApiModelProperty("接收人sid")
private List<RecipientListDto> list;
@ApiModelProperty("接收人id")
private List<String> receiveIdList;
}

17
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/RecipientListDto.java

@ -0,0 +1,17 @@
package com.yxt.anrui.scm.api.scmvehinventoryreport;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class RecipientListDto implements Vo {
private static final long serialVersionUID = 1105661416523691206L;
@ApiModelProperty("接收人sid")
private String sid; // 接收人sid
@ApiModelProperty("接收人姓名")
private String name; // 接收人姓名
}

14
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportDto.java

@ -32,6 +32,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehInventoryreportDto.java <br/>
@ -50,14 +52,12 @@ import lombok.Data;
public class ScmVehInventoryreportDto implements Dto {
private String sid; // sid
@ApiModelProperty("月度盘库sid")
private String userSid;
@ApiModelProperty("月度盘库sid")
private String mainSid; // 月度盘库sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
@ApiModelProperty("接收人list")
private List<RecipientListDto> recipientList;
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeign.java

@ -75,4 +75,9 @@ public interface ScmVehInventoryreportFeign {
@GetMapping("/fetchDetailsBySid/{sid}")
@ResponseBody
public ResultBean<ScmVehInventoryreportDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("发送报告")
@PostMapping("/sendReport")
@ResponseBody
public ResultBean sendReport(@RequestBody ScmVehInventoryreportDto dto);
}

5
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehinventoryreport/ScmVehInventoryreportFeignFallback.java

@ -69,4 +69,9 @@ public class ScmVehInventoryreportFeignFallback implements ScmVehInventoryreport
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口aaa/scmvehinventoryreport/fetchDetailsBySid无法访问");
}
@Override
public ResultBean sendReport(ScmVehInventoryreportDto dto) {
return null;
}
}

20
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthInfoVo.java

@ -0,0 +1,20 @@
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppScmVehPatrolinspectionmonthInfoVo implements Vo {
private static final long serialVersionUID = -5082102320532147476L;
@ApiModelProperty("本次应巡检数量")
private String totalNumber;
@ApiModelProperty("实际巡检数量")
private String actualNumber;
@ApiModelProperty("存在的问题")
private String question;
}

39
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthQuery.java

@ -0,0 +1,39 @@
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppScmVehPatrolinspectionmonthQuery implements Query {
private static final long serialVersionUID = -6285926370342867059L;
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("报告编号/创建人")
private String names;
@ApiModelProperty("创建日期")
private String date;
@ApiModelProperty("巡检报告sid")
private String reportSid;
@ApiModelProperty("巡检状态")
private String state;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("盘库开始日期")
@JsonProperty("InventStartDate")
private String InventStartDate;
@ApiModelProperty("盘库结束日期")
@JsonProperty("InventEndDate")
private String InventEndDate;
}

35
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/AppScmVehPatrolinspectionmonthVo.java

@ -0,0 +1,35 @@
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppScmVehPatrolinspectionmonthVo implements Vo {
private static final long serialVersionUID = -5082102320532147476L;
private String sid;
@ApiModelProperty("编号")
private String reportId;
@ApiModelProperty("创建人员")
private String name;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建时间")
private String date;
@ApiModelProperty("剩余巡检记录数量")
private String surplusNumber;
@ApiModelProperty("巡检记录总数数量")
private String totalNumber;
@ApiModelProperty("未处理数量")
private String unHandledNumber;
@ApiModelProperty("已处理数量")
private String processedNumber;
@ApiModelProperty("未巡检数量")
private String notHandledNumber;
@ApiModelProperty("实际巡检数量")
private String actualNumber;
}

64
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonth.java

@ -0,0 +1,64 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonth.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonth <br/>
* Description: 月度日常管理记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度日常管理记录", description = "月度日常管理记录")
@TableName("scm_veh_patrolinspectionmonth")
public class ScmVehPatrolinspectionmonth extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
}

65
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthDetailsVo.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthVo <br/>
* Description: 月度日常管理记录 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度日常管理记录 视图数据详情", description = "月度日常管理记录 视图数据详情")
public class ScmVehPatrolinspectionmonthDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
}

65
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthDto.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthDto.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthDto <br/>
* Description: 月度日常管理记录 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度日常管理记录 数据传输对象", description = "月度日常管理记录 数据传输对象")
public class ScmVehPatrolinspectionmonthDto implements Dto {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
}

97
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthFeign.java

@ -0,0 +1,97 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthInfoVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthQuery;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthFeign.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthFeign <br/>
* Description: 月度日常管理记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "月度日常管理记录")
@FeignClient(
contextId = "aaa-ScmVehPatrolinspectionmonth",
name = "aaa",
path = "v1/scmvehpatrolinspectionmonth",
fallback = ScmVehPatrolinspectionmonthFeignFallback.class)
public interface ScmVehPatrolinspectionmonthFeign {
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
@ResponseBody
public ResultBean<PagerVo<ScmVehPatrolinspectionmonthVo>> listPage(@RequestBody PagerQuery<ScmVehPatrolinspectionmonthQuery> pq);
@ApiOperation("新增或修改")
@PostMapping("/save")
@ResponseBody
public ResultBean save(@RequestBody ScmVehPatrolinspectionmonthDto dto);
@ApiOperation("根据sid删除记录")
@DeleteMapping("/delBySids")
@ResponseBody
public ResultBean delBySids(@RequestBody String[] sids);
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
@ResponseBody
public ResultBean<ScmVehPatrolinspectionmonthDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
@ApiOperation("手机端-判断是否生成巡检记录")
@GetMapping("/getInspectionRecords/{userSid}")
@ResponseBody
public ResultBean getInspectionRecords(@PathVariable("userSid") String userSid);
@ApiOperation("手机端-获取巡检报告列表")
@PostMapping("/getCarInventoryReportList")
@ResponseBody
public ResultBean<PagerVo<AppScmVehPatrolinspectionmonthVo>> getCarInspectionReportList(@RequestBody PagerQuery<AppScmVehPatrolinspectionmonthQuery> pagerQuery);
@ApiOperation("手机端-获取巡检报告")
@GetMapping("/getCarInspectionReport/{sid}")
@ResponseBody
public ResultBean<AppScmVehPatrolinspectionmonthInfoVo> getCarInspectionReport(@PathVariable("sid") String sid);
}

87
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthFeignFallback.java

@ -0,0 +1,87 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthFeignFallback <br/>
* Description: 月度日常管理记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Component
public class ScmVehPatrolinspectionmonthFeignFallback implements ScmVehPatrolinspectionmonthFeign {
@Override
public ResultBean<PagerVo<ScmVehPatrolinspectionmonthVo>> listPage(PagerQuery<ScmVehPatrolinspectionmonthQuery> pq){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口aaa/scmvehpatrolinspectionmonth/listPage无法访问");
}
@Override
public ResultBean save(ScmVehPatrolinspectionmonthDto dto){
return ResultBean.fireFail().setMsg("接口aaa/scmvehpatrolinspectionmonth/save无法访问");
}
@Override
public ResultBean delBySids( String[] sids){
return ResultBean.fireFail().setMsg("接口aaa/scmvehpatrolinspectionmonth/delBySids无法访问");
}
@Override
public ResultBean<ScmVehPatrolinspectionmonthDetailsVo> fetchDetailsBySid(String sid){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口aaa/scmvehpatrolinspectionmonth/fetchDetailsBySid无法访问");
}
@Override
public ResultBean getInspectionRecords(String userSid) {
return null;
}
@Override
public ResultBean<PagerVo<AppScmVehPatrolinspectionmonthVo>> getCarInspectionReportList(PagerQuery<AppScmVehPatrolinspectionmonthQuery> pagerQuery) {
return null;
}
@Override
public ResultBean<AppScmVehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
return null;
}
}

63
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthQuery.java

@ -0,0 +1,63 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthQuery.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthQuery <br/>
* Description: 月度日常管理记录 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度日常管理记录 查询条件", description = "月度日常管理记录 查询条件")
public class ScmVehPatrolinspectionmonthQuery implements Query {
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
}

65
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthVo.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthVo <br/>
* Description: 月度日常管理记录 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "月度日常管理记录 视图数据对象", description = "月度日常管理记录 视图数据对象")
public class ScmVehPatrolinspectionmonthVo implements Vo {
private String sid; // sid
@ApiModelProperty("编号(yyyyMMdd)")
private String billNo; // 编号(yyyyMMdd)
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
}

30
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionmonth/VehPatrolinspectionmonthVo.java

@ -0,0 +1,30 @@
package com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehPatrolinspectionmonthVo implements Vo {
private static final long serialVersionUID = -9027195577856709868L;
private String sid;
@ApiModelProperty("编号")
private String reportId;
@ApiModelProperty("创建人员")
private String name;
@ApiModelProperty("创建时间")
private String date;
@ApiModelProperty("剩余巡检记录数量")
private int surplusNumber;
@ApiModelProperty("巡检记录总数数量")
private int totalNumber;
@ApiModelProperty("未处理数量")
private int unHandledNumber;
@ApiModelProperty("已处理数量")
private int processedNumber;
@ApiModelProperty("未巡检数量")
private int notHandledNumber;
@ApiModelProperty("实际巡检数量")
private int actualNumber;
}

62
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreport.java

@ -0,0 +1,62 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreport.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreport <br/>
* Description: 日常管理报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "日常管理报告", description = "日常管理报告")
@TableName("scm_veh_patrolinspectionreport")
public class ScmVehPatrolinspectionreport extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("月度日常管理记录sid")
private String mainSid; // 月度日常管理记录sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

63
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportDetailsVo.java

@ -0,0 +1,63 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo <br/>
* Description: 日常管理报告 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "日常管理报告 视图数据详情", description = "日常管理报告 视图数据详情")
public class ScmVehPatrolinspectionreportDetailsVo implements Vo {
private String sid; // sid
@ApiModelProperty("月度日常管理记录sid")
private String mainSid; // 月度日常管理记录sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

63
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportDto.java

@ -0,0 +1,63 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportDto.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportDto <br/>
* Description: 日常管理报告 数据传输对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "日常管理报告 数据传输对象", description = "日常管理报告 数据传输对象")
public class ScmVehPatrolinspectionreportDto implements Dto {
private String sid; // sid
@ApiModelProperty("月度日常管理记录sid")
private String mainSid; // 月度日常管理记录sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

78
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportFeign.java

@ -0,0 +1,78 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportFeign.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportFeign <br/>
* Description: 日常管理报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "日常管理报告")
@FeignClient(
contextId = "aaa-ScmVehPatrolinspectionreport",
name = "aaa",
path = "v1/scmvehpatrolinspectionreport",
fallback = ScmVehPatrolinspectionreportFeignFallback.class)
public interface ScmVehPatrolinspectionreportFeign {
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
@ResponseBody
public ResultBean<PagerVo<ScmVehPatrolinspectionreportVo>> listPage(@RequestBody PagerQuery<ScmVehPatrolinspectionreportQuery> pq);
@ApiOperation("新增或修改")
@PostMapping("/save")
@ResponseBody
public ResultBean save(@RequestBody ScmVehPatrolinspectionreportDto dto);
@ApiOperation("根据sid删除记录")
@DeleteMapping("/delBySids")
@ResponseBody
public ResultBean delBySids(@RequestBody String[] sids);
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
@ResponseBody
public ResultBean<ScmVehPatrolinspectionreportDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
}

72
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportFeignFallback.java

@ -0,0 +1,72 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportFeignFallback <br/>
* Description: 日常管理报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Component
public class ScmVehPatrolinspectionreportFeignFallback implements ScmVehPatrolinspectionreportFeign {
@Override
public ResultBean<PagerVo<ScmVehPatrolinspectionreportVo>> listPage(PagerQuery<ScmVehPatrolinspectionreportQuery> pq){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口aaa/scmvehpatrolinspectionreport/listPage无法访问");
}
@Override
public ResultBean save(ScmVehPatrolinspectionreportDto dto){
return ResultBean.fireFail().setMsg("接口aaa/scmvehpatrolinspectionreport/save无法访问");
}
@Override
public ResultBean delBySids( String[] sids){
return ResultBean.fireFail().setMsg("接口aaa/scmvehpatrolinspectionreport/delBySids无法访问");
}
@Override
public ResultBean<ScmVehPatrolinspectionreportDetailsVo> fetchDetailsBySid(String sid){
ResultBean rb = ResultBean.fireFail();
return rb.setMsg("接口aaa/scmvehpatrolinspectionreport/fetchDetailsBySid无法访问");
}
}

61
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportQuery.java

@ -0,0 +1,61 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportQuery.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportQuery <br/>
* Description: 日常管理报告 查询条件. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "日常管理报告 查询条件", description = "日常管理报告 查询条件")
public class ScmVehPatrolinspectionreportQuery implements Query {
@ApiModelProperty("月度日常管理记录sid")
private String mainSid; // 月度日常管理记录sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

63
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportVo.java

@ -0,0 +1,63 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.api.scmvehpatrolinspectionreport;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportVo.java <br/>
* Class: com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo <br/>
* Description: 日常管理报告 视图数据对象. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Data
@ApiModel(value = "日常管理报告 视图数据对象", description = "日常管理报告 视图数据对象")
public class ScmVehPatrolinspectionreportVo implements Vo {
private String sid; // sid
@ApiModelProperty("月度日常管理记录sid")
private String mainSid; // 月度日常管理记录sid
@ApiModelProperty("接收人sid")
private String receiverSids; // 接收人sid
@ApiModelProperty("接收人姓名")
private String receiverNames; // 接收人姓名
@ApiModelProperty("盘库报告内容")
private String reportContent; // 盘库报告内容
}

16
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.java

@ -34,6 +34,9 @@ import com.yxt.anrui.scm.api.scmvehicleinventory.*;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageQuery;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppVinAndRemarksVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -76,7 +79,7 @@ public interface ScmVehicleInventoryMapper extends BaseMapper<ScmVehicleInventor
* @param name
* @return
*/
IPage<AppScmVehicleCarInventoryListPageVo> getCarInventoryList(IPage<AppScmVehicleCarInventoryListPageQuery> page, @Param(Constants.WRAPPER) QueryWrapper<AppScmVehicleCarInventoryListPageVo> qw, @Param("name") String name);
IPage<AppScmVehicleCarInventoryListPageVo> getCarInventoryList(IPage<AppScmVehicleCarInventoryListPageQuery> page, @Param(Constants.WRAPPER) QueryWrapper<AppScmVehicleCarInventoryListPageVo> qw, @Param("names") String names);
/**
* 手机端-获取待盘库列表
@ -124,8 +127,17 @@ public interface ScmVehicleInventoryMapper extends BaseMapper<ScmVehicleInventor
@Select("select max(id) from scm_vehicle_stay_inventory svsi where svsi.mainSid = #{vin}")
String getVin(@Param("vin") String vin);
List<ScmVehicleStayInventoryVo> selInventory(@Param("vin") String vin, @Param("id") String id, @Param("useOrgSid") String useOrgSid);
@Select(" select InventoryDate as lastDate,InventoryName as lastName from scm_vehicle_inventory where vinNo = #{vin} and id &lt; #{ids} and createOrgSid = #{createOrgSid} ORDER BY id DESC")
List<ScmVehicleStayInventoryVo> selInventory(@Param("vin") String vin, @Param("ids") String ids, @Param("createOrgSid") String createOrgSid);
@Select("select count(*) from scm_vehicle_inventory svi where svi.useOrgSid = #{useOrgSid} and InventoryState = '无' ")
int getInventoryState(@Param("useOrgSid") String useOrgSid);
AppVehInventorymonthVo getMonthByMainSid(@Param("mainSid") String mainSid);
List<AppVinAndRemarksVo> getMonthRemarksByMainSid(@Param("sid") String sid, @Param("inventoryStateKey") String inventoryStateKey);
List<ScmVehicleStayInventoryVo> selectInventory(@Param("vin") String vin, @Param("id") String id, @Param("createOrgSid") String createOrgSid);
List<String> selectByUseOrgSid(@Param("createOrgSid") String createOrgSid);
}

72
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryMapper.xml

@ -17,8 +17,7 @@
resultType="com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageVo">
SELECT
sid,
mainSid AS vin,
certificateKey AS certificateState,
vinNo AS vin,
InventoryState AS `state`,
inventorySid,
inventoryName,
@ -30,8 +29,8 @@
scm_vehicle_inventory svi
<where>
${ew.sqlSegment}
<if test="name != '' and name != null ">
and concat(svi.mainSid,svi.InventoryName) LIKE concat('%', #{name}, '%')
<if test="names != '' and names != null ">
and concat(svi.vinNo,svi.InventoryName) LIKE concat('%', #{names}, '%')
</if>
</where>
ORDER BY id DESC
@ -42,6 +41,7 @@
SELECT
id,
sid,
createOrgSid,
vinNo AS vin,
location AS warehouse,
InventoryDate,
@ -61,19 +61,19 @@
resultType="com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryInfoVo">
SELECT id,
sid,
mainSid as vin,
mainSid,
vinNo as vin,
location as warehouse,
locationSid as warehouseSid,
createOrgSid
FROM scm_vehicle_stay_inventory
FROM scm_vehicle_inventory
WHERE sid = #{recordSid}
</select>
<select id="getInventoryInfo"
resultType="com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryDetailedsVo">
SELECT id,
mainSid AS vin,
certificateKey AS certificateState,
vinNo AS vin,
InventoryDate AS `date`,
location AS warehouse,
inventoryName AS `name`,
@ -88,7 +88,6 @@
SELECT InventoryDate,
InventoryName,
location,
certificate,
InventoryState,
remarks
FROM scm_vehicle_inventory
@ -100,7 +99,7 @@
<select id="getInventoryByRecordSid"
resultType="com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryInfoVo">
SELECT sid,
mainSid as vin,
vinNo as vin,
location as warehouse,
locationSid as warehouseSid,
inventoryName,
@ -114,14 +113,55 @@
FROM scm_vehicle_inventory
WHERE sid = #{recordSid}
</select>
<select id="selInventory"
<select id="getMonthByMainSid"
resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.AppVehInventorymonthVo">
SELECT count(*),
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryStateKey != '001' and svi.mainSid = #{mainSid}) AS totalNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryStateKey = '004' and svi.mainSid = #{mainSid}) AS normalNumber ,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryStateKey = '003' and svi.mainSid = #{mainSid}) AS lossNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryStateKey = '002' and svi.mainSid = #{mainSid}) AS damageNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryStateKey = '001' and svi.mainSid = #{mainSid}) AS profitNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svi.InventoryState = '无' and svi.mainSid = #{mainSid}) AS surplusNumber
FROM scm_vehicle_inventory svi
WHERE svi.mainSid = #{mainSid}
</select>
<select id="selectInventory"
resultType="com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryVo">
select InventoryDate as lastDate,
InventoryName as lastName
from scm_vehicle_stay_inventory svsi
where svsi.mainSid = #{vin}
and svsi.id &lt; #{id}
and svsi.createOrgSid = #{useOrgSid}
ORDER BY id DESC
from scm_vehicle_inventory
where vinNo = #{vin}
and id &lt; #{id}
and createOrgSid = #{createOrgSid}
order by id desc
</select>
<select id="getMonthRemarksByMainSid"
resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.AppVinAndRemarksVo">
SELECT vinNo, remarks
FROM scm_vehicle_inventory svi
WHERE svi.mainSid = #{sid}
and svi.InventoryStateKey = #{inventoryStateKey}
</select>
<select id="selectByUseOrgSid" resultType="java.lang.String">
SELECT mainSid
FROM scm_vehicle_inventory svi
WHERE svi.useOrgSid = #{createOrgSid}
order by id desc
</select>
<!-- <select id="selInventory"-->
<!-- resultType="com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryVo">-->
<!-- select InventoryDate as lastDate,-->
<!-- InventoryName as lastName-->
<!-- from scm_vehicle_inventory svi-->
<!-- where svi.vinNo = #{vin}-->
<!-- and svi.id &lt; #{ids}-->
<!-- and svi.createOrgSid = #{createOrgSid}-->
<!-- ORDER BY svi.id DESC-->
<!-- </select>-->
</mapper>

207
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehicleinventory/ScmVehicleInventoryService.java

@ -35,6 +35,9 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.scm.api.scmfile.ScmFile;
import com.yxt.anrui.scm.api.scmvehicleinventory.*;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.*;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppVinAndRemarksVo;
import com.yxt.anrui.scm.biz.scmfile.ScmFileService;
import com.yxt.anrui.scm.biz.scmvehiclestayinventory.ScmVehicleStayInventoryService;
import com.yxt.common.base.config.component.FileUploadComponent;
@ -166,13 +169,7 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
}
QueryWrapper<AppScmVehicleCarInventoryListPageVo> qw = appCarQueryWrapper(pagerQuery.getParams());
AppScmVehicleCarInventoryListPageQuery params = pagerQuery.getParams();
IPage<AppScmVehicleCarInventoryListPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getName());
// List<AppScmVehicleCarInventoryListPageVo> records = iPage.getRecords();
// for (AppScmVehicleCarInventoryListPageVo record : records) {
// if ("2".equals(record.getState())) {
// record.setShowUpdataBtn(true);
// }
// }
IPage<AppScmVehicleCarInventoryListPageVo> iPage = baseMapper.getCarInventoryList(page, qw, params.getNames());
return iPage;
}
@ -183,10 +180,10 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
* @return
*/
public IPage<AppScmVehicleStayInventoryListPageVo> getInventoryList(PagerQuery<AppScmVehicleStayInventoryListPageQuery> pagerQuery) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
IPage<AppScmVehicleStayInventoryListPageQuery> page = PagerUtil.queryToPage(pagerQuery);
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(pagerQuery.getParams().getUserSid()).getData();
pagerQuery.getParams().setUseOrgSid(useOrgSid);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
QueryWrapper<AppScmVehicleStayInventoryListPageVo> qw = new QueryWrapper<>();
qw.eq("isDelete", 0);
qw.eq("InventoryState", "无");
@ -198,6 +195,22 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
}
AppScmVehicleStayInventoryListPageQuery params = pagerQuery.getParams();
IPage<AppScmVehicleStayInventoryListPageVo> iPage = baseMapper.getInventoryList(page, qw, params.getNames());
List<AppScmVehicleStayInventoryListPageVo> records = iPage.getRecords();
for (AppScmVehicleStayInventoryListPageVo record : records) {
List<ScmVehicleStayInventoryVo> scmVehicleStayInventoryVos = baseMapper.selectInventory(record.getVin(), record.getId(), record.getCreateOrgSid());
if (scmVehicleStayInventoryVos.size() <= 0) {
record.setInventoryDate("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
record.setInventoryDate(simpleDateFormat.format(scmVehicleStayInventoryVo.getLastDate()));
}
if (scmVehicleStayInventoryVos.size() <= 0) {
record.setInventoryName("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
record.setInventoryName(scmVehicleStayInventoryVo.getLastName());
}
}
return iPage;
}
@ -216,7 +229,13 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
if (StringUtils.isNotBlank(query.getWarehouseSid())) {
qw.eq("svi.locationSid", query.getWarehouseSid());
}
qw.notIn("InventoryState", "无");
if (StringUtils.isNotBlank(query.getState())) {
qw.eq("svi.InventoryStateKey", query.getState());
}
if (StringUtils.isNotBlank(query.getReportSid())) {
qw.eq("svi.mainSid", query.getReportSid());
}
qw.notIn("svi.InventoryState", "无");
String inventStartDate = query.getInventStartDate();
String inventEndDate = query.getInventEndDate();
qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (InventoryDate,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')").
@ -236,18 +255,21 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
List<String> images = new ArrayList<>();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
AppScmVehicleStayInventoryInfoVo vo = baseMapper.getInventory(recordSid);
List<ScmVehicleStayInventoryVo> scmVehicleStayInventoryVos = baseMapper.selInventory(vo.getVin(), vo.getId(), vo.getCreateOrgSid());
if (scmVehicleStayInventoryVos.size() <= 0) {
vo.setLastData("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
vo.setLastData(simpleDateFormat.format(scmVehicleStayInventoryVo.getLastDate()));
}
if (scmVehicleStayInventoryVos.size() <= 0) {
vo.setLastName("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
vo.setLastName(scmVehicleStayInventoryVo.getLastName());
// List<ScmVehicleStayInventoryVo> scmVehicleStayInventoryVos = baseMapper.selInventory(vin, ids, createOrgSid);
List<ScmVehicleStayInventoryVo> scmVehicleStayInventoryVos = baseMapper.selectInventory(vo.getVin(), vo.getId(), vo.getCreateOrgSid());
if (scmVehicleStayInventoryVos.size() > 0) {
if (scmVehicleStayInventoryVos == null) {
vo.setLastData("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
vo.setLastData(simpleDateFormat.format(scmVehicleStayInventoryVo.getLastDate()));
}
if (scmVehicleStayInventoryVos == null) {
vo.setLastName("无");
} else {
ScmVehicleStayInventoryVo scmVehicleStayInventoryVo = scmVehicleStayInventoryVos.get(0);
vo.setLastName(scmVehicleStayInventoryVo.getLastName());
}
}
List<ScmFile> scmFiles = scmFileService.selectByLinkSid(recordSid, type);
for (ScmFile scmFile : scmFiles) {
@ -309,62 +331,108 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
if ("002".equals(inventoryStateKey) && StringUtils.isBlank(remarks)) {
return rb.setMsg("备注请填写盘损原因");
}
BaseVehicleVo data = baseVehicleFeign.selVehicleByVinNo(dto.getMainSid()).getData();
if (data != null) {
return rb.setMsg("此车架号不允许盘盈");
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
if (simpleDateFormat.format(new Date()).equals(dto.getLastData())) {
return rb.setMsg("今日已盘车辆,请勿重复提交");
}
ScmVehicleInventory scmVehicleInventory = new ScmVehicleInventory();
BeanUtil.copyProperties(dto, scmVehicleInventory, "sid");
String loginName = dto.getLoginName();
String loginSid = dto.getLoginSid();
if (StringUtils.isNotBlank(inventoryName)) {
inventoryName += "、" + loginName;
scmVehicleInventory.setInventoryName(inventoryName);
} else {
scmVehicleInventory.setInventoryName(loginName);
}
if (StringUtils.isNotBlank(inventorySid)) {
inventorySid += "," + loginSid;
scmVehicleInventory.setInventorySid(inventorySid);
String sid = dto.getSid();
if (StringUtils.isBlank(sid)) {
BaseVehicleVo data = baseVehicleFeign.selVehicleByVinNo(dto.getVinNo()).getData();
if (data != null) {
return rb.setMsg("此车架号不允许盘盈");
}
ScmVehicleInventory scmVehicleInventory = new ScmVehicleInventory();
BeanUtil.copyProperties(dto, scmVehicleInventory, "sid");
String loginName = dto.getLoginName();
String loginSid = dto.getLoginSid();
if (StringUtils.isNotBlank(inventoryName)) {
inventoryName += "、" + loginName;
scmVehicleInventory.setInventoryName(inventoryName);
} else {
scmVehicleInventory.setInventoryName(loginName);
}
if (StringUtils.isNotBlank(inventorySid)) {
inventorySid += "," + loginSid;
scmVehicleInventory.setInventorySid(inventorySid);
} else {
scmVehicleInventory.setInventorySid(loginSid);
}
scmVehicleInventory.setInventoryDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
scmVehicleInventory.setCreateOrgSid(loginSid);
scmVehicleInventory.setCreateOrgSid(createOrgSid);
scmVehicleInventory.setInventoryStateKey(dto.getInventoryStateKey());
scmVehicleInventory.setInventoryState(dto.getInventoryState());
List<String> list = baseMapper.selectByUseOrgSid(createOrgSid);
if (list.size() == 0) {
return rb.setMsg("请先生成盘库记录");
}
String mainSid = list.get(0);
scmVehicleInventory.setMainSid(mainSid);
scmFileService.deleteByLinkSidAndType(scmVehicleInventory.getSid(), type);
List<String> images = dto.getImages();
if (dto.getImages() != null) {
if (images.size() > 0) {
for (String image : images) {
if (image.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
s = image.replace(fileUploadComponent.getUrlPrefix(), "");
}
ScmFile scmFile = new ScmFile();
scmFile.setAttachType(type);
scmFile.setFileName("盘库见证材料");
scmFile.setFilePath(s);
scmFile.setLinkSid(scmVehicleInventory.getSid());
scmFileService.save(scmFile);
}
}
}
save(scmVehicleInventory);
} else {
scmVehicleInventory.setInventorySid(loginSid);
}
scmVehicleInventory.setInventoryDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
scmVehicleInventory.setCreateOrgSid(loginSid);
scmVehicleInventory.setCreateOrgSid(createOrgSid);
scmVehicleInventory.setInventoryStateKey(dto.getInventoryStateKey());
scmVehicleInventory.setInventoryState(dto.getInventoryState());
ScmVehicleInventory scmVehicleInventory = fetchBySid(sid);
BeanUtil.copyProperties(dto, scmVehicleInventory, "sid");
String loginName = dto.getLoginName();
String loginSid = dto.getLoginSid();
if (StringUtils.isNotBlank(inventoryName)) {
inventoryName += "、" + loginName;
scmVehicleInventory.setInventoryName(inventoryName);
} else {
scmVehicleInventory.setInventoryName(loginName);
}
if (StringUtils.isNotBlank(inventorySid)) {
inventorySid += "," + loginSid;
scmVehicleInventory.setInventorySid(inventorySid);
} else {
scmVehicleInventory.setInventorySid(loginSid);
}
scmVehicleInventory.setInventoryDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
scmVehicleInventory.setCreateOrgSid(loginSid);
scmVehicleInventory.setCreateOrgSid(createOrgSid);
scmVehicleInventory.setInventoryStateKey(dto.getInventoryStateKey());
scmVehicleInventory.setInventoryState(dto.getInventoryState());
scmFileService.deleteByLinkSidAndType(scmVehicleInventory.getSid(), type);
List<String> images = dto.getImages();
if (dto.getImages() != null) {
if (images.size() > 0) {
for (String image : images) {
if (image.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
s = image.replace(fileUploadComponent.getUrlPrefix(), "");
scmFileService.deleteByLinkSidAndType(scmVehicleInventory.getSid(), type);
List<String> images = dto.getImages();
if (dto.getImages() != null) {
if (images.size() > 0) {
for (String image : images) {
if (image.indexOf(fileUploadComponent.getUrlPrefix()) > -1) {
s = image.replace(fileUploadComponent.getUrlPrefix(), "");
}
ScmFile scmFile = new ScmFile();
scmFile.setAttachType(type);
scmFile.setFileName("盘库见证材料");
scmFile.setFilePath(s);
scmFile.setLinkSid(scmVehicleInventory.getSid());
scmFileService.save(scmFile);
}
ScmFile scmFile = new ScmFile();
scmFile.setAttachType(type);
scmFile.setFileName("盘库见证材料");
scmFile.setFilePath(s);
scmFile.setLinkSid(scmVehicleInventory.getSid());
scmFileService.save(scmFile);
}
}
}
String sid = dto.getSid();
if (StringUtils.isNotBlank(sid)) {
if (StringUtils.isBlank(dto.getInventoryName())) {
scmVehicleStayInventoryService.delBySid(sid, dto.getLoginName());
} else {
scmVehicleStayInventoryService.delBySid(sid, dto.getInventoryName());
}
updateById(scmVehicleInventory);
}
save(scmVehicleInventory);
return rb.success().setMsg("保存成功");
}
@ -428,7 +496,6 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
lastInfo.setLastName(scmVehicleInventory.getInventoryName());
lastInfo.setLastWarehouse(scmVehicleInventory.getLocation());
lastInfo.setLastState(scmVehicleInventory.getInventoryState());
// lastInfo.setLastCertificateState(scmVehicleInventory.getCertificate());
lastInfo.setLastRemarks(scmVehicleInventory.getRemarks());
vo.setLastInfo(lastInfo);
} else {
@ -454,7 +521,7 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
public ResultBean<String> getToDoNum(String userSid) {
ResultBean rb = ResultBean.fireFail();
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
int count = baseMapper.getToDoNum(useOrgSid);
int count = baseMapper.getInventoryState(useOrgSid);
return rb.success().setData(String.valueOf(count));
}
@ -462,8 +529,16 @@ public class ScmVehicleInventoryService extends MybatisBaseService<ScmVehicleInv
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
int count = baseMapper.getInventoryState(useOrgSid);
if (count == 0) {
return true;
return false;
}
return false;
return true;
}
public AppVehInventorymonthVo getMonthByMainSid(String mainSid) {
return baseMapper.getMonthByMainSid(mainSid);
}
public List<AppVinAndRemarksVo> getMonthRemarksByMainSid(String sid, String inventoryStateKey) {
return baseMapper.getMonthRemarksByMainSid(sid, inventoryStateKey);
}
}

6
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.java

@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.scm.api.scmvehiclepatrolinspection.*;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.VehPatrolinspectionmonthVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@ -74,4 +75,9 @@ public interface ScmVehiclePatrolinspectionMapper extends BaseMapper<ScmVehicleP
IPage<AppScmVehiclePatrolinspectionPageVo> getCarInventoryList(IPage<AppScmVehiclePatrolinspectionPageQuery> page, @Param(Constants.WRAPPER) QueryWrapper<AppScmVehiclePatrolinspectionPageVo> qw, @Param("name") String name);
AppScmVehiclePatroVo getInspectionInfo(String recordSid);
@Select("select count(*) from scm_vehicle_patrolinspection svp where svp.useOrgSid = #{useOrgSid} and patrolInspectionStateKey = '000' ")
int getPatrolinspectionState(String useOrgSid);
VehPatrolinspectionmonthVo getMonthByMainSid(@Param("mainSid") String mainSid);
}

14
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.xml

@ -24,7 +24,8 @@
<select id="getCarInventoryList"
resultType="com.yxt.anrui.scm.api.scmvehiclepatrolinspection.AppScmVehiclePatrolinspectionPageVo">
SELECT sid,
mainSid as vin,
vinNo as vin,
mainSid,
location as warehouse,
patrolInspectionDate as newInspectionDate,
patrolInspectionName as newInspectionName
@ -55,4 +56,15 @@
left join scm_vehicle_patrolinspectionsheet svss on svss.patrolInspectionSid = svp.sid
where svp.sid = #{recordSid}
</select>
<select id="getMonthByMainSid"
resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.VehPatrolinspectionmonthVo">
SELECT count(*),
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svp.state = '1' and svp.mainSid = #{mainSid}) AS totalNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svp.patrolInspectionStateKey = '001' and svp.mainSid = #{mainSid}) AS unHandledNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svp.patrolInspectionStateKey = '002' and svp.mainSid = #{mainSid}) AS processedNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svp.patrolInspectionStateKey = '000' and svp.mainSid = #{mainSid}) AS notHandledNumber,
(SELECT count(*) FROM scm_vehicle_inventory svi WHERE svp.patrolInspectionStateKey = '000' and svi.mainSid = #{mainSid}) AS surplusNumber
FROM scm_vehicle_patrolinspection svp
WHERE svp.mainSid = #{mainSid}
</select>
</mapper>

14
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionService.java

@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.scm.api.scmfile.ScmFile;
import com.yxt.anrui.scm.api.scmvehiclepatrolinspection.*;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.VehPatrolinspectionmonthVo;
import com.yxt.anrui.scm.biz.scmfile.ScmFileService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
@ -201,4 +202,17 @@ public class ScmVehiclePatrolinspectionService extends MybatisBaseService<ScmVeh
}
return rb.success().setData(vo);
}
public boolean getPatrolinspectionState(String userSid) {
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
int count = baseMapper.getPatrolinspectionState(useOrgSid);
if (count == 0) {
return false;
}
return true;
}
public VehPatrolinspectionmonthVo getMonthByMainSid(String mainSid) {
return baseMapper.getMonthByMainSid(mainSid);
}
}

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetMapper.xml

@ -34,7 +34,7 @@
<select id="getPCInspection"
resultType="com.yxt.anrui.scm.api.scmvehiclepatrolinspectionsheet.ScmVehiclePatrolinspectionsheetDetailsVo">
SELECT sid,
patrolInspectionSid,
vinNo,
mainSid,
model,
situationExplain,
@ -44,6 +44,6 @@
location,
address
FROM scm_vehicle_patrolinspectionsheet
WHERE patrolInspectionSid = #{sid}
WHERE mainSid = #{sid}
</select>
</mapper>

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetService.java

@ -176,12 +176,11 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
String type1 = "06"; //巡检相关照片
ScmVehiclePatrolinspectionsheet scmVehiclePatrolinspectionsheet = new ScmVehiclePatrolinspectionsheet();
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(dto.getUserSid()).getData();
ScmVehiclePatrolinspectionsheetDetailsVo pcInspection = baseMapper.getPCInspection(dto.getPatrolInspectionSid());
ScmVehiclePatrolinspectionsheetDetailsVo pcInspection = baseMapper.getPCInspection(dto.getMainSid());
if (pcInspection == null) {
BeanUtil.copyProperties(dto, scmVehiclePatrolinspectionsheet, "sid");
scmVehiclePatrolinspectionsheet.setCreateOrgSid(useOrgSid);
save(scmVehiclePatrolinspectionsheet);
scmVehicleStayPatrolinspectionService.updateState(dto.getPatrolInspectionSid());
scmFileService.deleteByLinkSidAndType(scmVehiclePatrolinspectionsheet.getSid(), type1);
List<String> images = dto.getImages();
for (String s : images) {
@ -203,8 +202,6 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
if (i == 0) {
return rb.setMsg("操作失败");
}
//更新待巡检中的为已暂存
scmVehicleStayPatrolinspectionService.updateByState(dto.getPatrolInspectionSid(), 2);
scmFileService.deleteByLinkSidAndType(dto.getSid(), type1);
List<String> images = dto.getImages();
for (String s : images) {
@ -239,7 +236,7 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
}
String s1 = "";
String type1 = "06"; //巡检相关照片
String patrolInspectionSid = dto.getPatrolInspectionSid();
String patrolInspectionSid = dto.getMainSid();
String newTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
ScmVehiclePatrolinspectionsheetDetailsVo pcInspection = baseMapper.getPCInspection(patrolInspectionSid);
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(dto.getUserSid()).getData();
@ -273,7 +270,7 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
scmVehiclePatrolinspection.setLocationSid(scmVehicleStayPatrolinspection.getLocationSid());
scmVehiclePatrolinspection.setPatrolInspectionDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
scmVehiclePatrolinspection.setPatrolInspectionName(dto.getUserName());
scmVehiclePatrolinspection.setUseOrgName(data.getOrgName());
scmVehiclePatrolinspection.setUseOrgSid(dto.getCreateOrgSid());
scmVehiclePatrolinspection.setCreateOrgSid(dto.getCreateOrgSid());
scmVehiclePatrolinspectionService.save(scmVehiclePatrolinspection);
baseMapper.updatePatSid(pcInspection.getSid(), scmVehiclePatrolinspection.getSid());
@ -306,10 +303,10 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
scmVehiclePatrolinspection.setPatrolInspectionDate(newTime);
scmVehiclePatrolinspection.setPatrolInspectionName(dto.getUserName());
scmVehiclePatrolinspection.setCreateOrgSid(useOrgSid);
scmVehiclePatrolinspection.setUseOrgName(data.getOrgName());
scmVehiclePatrolinspection.setUseOrgSid(useOrgSid);
scmVehiclePatrolinspection.setSid(scmVehicleStayPatrolinspection.getSid());
scmVehiclePatrolinspectionService.save(scmVehiclePatrolinspection);
scmVehiclePatrolinspectionsheet.setPatrolInspectionSid(scmVehiclePatrolinspection.getSid());
scmVehiclePatrolinspectionsheet.setMainSid(scmVehiclePatrolinspection.getSid());
save(scmVehiclePatrolinspectionsheet);
return rb.success().setMsg("操作成功");
}

5
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionRest.java

@ -95,11 +95,6 @@ public class ScmVehicleStayPatrolinspectionRest implements ScmVehicleStayPatroli
return rb.success().setData(vo);
}
@Override
public ResultBean getInspectionRecords(String userSid) {
return scmVehicleStayPatrolinspectionService.getInspectionRecords(userSid);
}
@Override
public ResultBean<PagerVo<AppScmVehicleStayPatrolinspectionPageVo>> getInspectionList(PagerQuery<AppScmVehicleStayPatrolinspectionPageQuery> pagerQuery) {
if (StringUtils.isBlank(pagerQuery.getParams().getUserSid())) {

33
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclestaypatrolinspection/ScmVehicleStayPatrolinspectionService.java

@ -124,39 +124,6 @@ public class ScmVehicleStayPatrolinspectionService extends MybatisBaseService<Sc
}
/**
* 保存所有待巡检信息
*
* @param userSid
*/
@Transactional(rollbackFor = Exception.class)
public ResultBean getInspectionRecords(String userSid) {
ResultBean rb = ResultBean.fireFail();
ResultBean<String> pathSidByUserSid = sysStaffOrgFeign.getPathSidByUserSid(userSid);
String orgSid = pathSidByUserSid.getData();
List<ScmVehicleStayPatrolinspectionVo> scmVehicleStayPatrolinspectionVos = baseMapper.selectListVo(orgSid);
if (scmVehicleStayPatrolinspectionVos.size() > 0) {
return rb.setMsg("生成巡检记录失败,请查看是否有未巡检的记录");
}
List<AppScmInventoryRecordsVo> list = baseVehicleFeign.selectInventoryRecords(userSid).getData();
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
for (AppScmInventoryRecordsVo appScmInventoryRecordsVo : list) {
ScmVehicleStayPatrolinspection scmVehicleStayPatrolinspection = new ScmVehicleStayPatrolinspection();
scmVehicleStayPatrolinspection.setMainSid(appScmInventoryRecordsVo.getVin());
scmVehicleStayPatrolinspection.setLocationSid(appScmInventoryRecordsVo.getWarehouseSid());
scmVehicleStayPatrolinspection.setLocation(appScmInventoryRecordsVo.getWarehouse());
scmVehicleStayPatrolinspection.setModelSid(appScmInventoryRecordsVo.getModelSid());
scmVehicleStayPatrolinspection.setModelName(appScmInventoryRecordsVo.getModelName());
scmVehicleStayPatrolinspection.setCreateOrgSid(orgSid);
save(scmVehicleStayPatrolinspection);
}
} else {
return rb.setMsg("暂无需要巡检记录");
}
return rb.success();
}
/**
* 手机端-获取巡检列表
*

33
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.java

@ -26,14 +26,16 @@
package com.yxt.anrui.scm.biz.scmvehinventorymonth;
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.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonth;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@ -53,13 +55,22 @@ import java.util.List;
@Mapper
public interface ScmVehInventorymonthMapper extends BaseMapper<ScmVehInventorymonth> {
//@Update("update scm_veh_inventorymonth set name=#{msg} where id=#{id}")
//IPage<ScmVehInventorymonthVo> voPage(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventorymonth> qw);
IPage<ScmVehInventorymonthVo> selectPageVo(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
List<ScmVehInventorymonthVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
@Select("select * from scm_veh_inventorymonth")
List<ScmVehInventorymonthVo> selectListVo();
//@Update("update scm_veh_inventorymonth set name=#{msg} where id=#{id}")
//IPage<ScmVehInventorymonthVo> voPage(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehInventorymonth> qw);
IPage<ScmVehInventorymonthVo> selectPageVo(IPage<ScmVehInventorymonth> page, @Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
List<ScmVehInventorymonthVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehInventorymonth> qw);
@Select("select * from scm_veh_inventorymonth")
List<ScmVehInventorymonthVo> selectListVo();
IPage<AppScmVehInventorymonthVo> getCarInventoryReportList(IPage<AppScmVehInventorymonthQuery> page, @Param(Constants.WRAPPER) QueryWrapper<AppScmVehInventorymonthVo> qw, @Param("names") String names);
String selectNum(String bill);
@Update("update scm_veh_inventorymonth set state = 1 where sid = #{mainSid}")
void updateByMainSid(@Param("mainSid") String mainSid);
AppScmVehInventorymonthInfoVo selByMainSid(@Param("sid") String sid);
}

53
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthMapper.xml

@ -1,13 +1,48 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth <where> ${ew.sqlSegment} </where>
</select>
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth
<where>${ew.sqlSegment}</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo">
SELECT * FROM scm_veh_inventorymonth
<where>${ew.sqlSegment}</where>
</select>
<select id="getCarInventoryReportList"
resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo">
SELECT
sid,
billNo as reportId,
DATE_FORMAT(svi.createTime, '%Y-%m-%d') as `date`,
createBySid,
`state`
FROM
scm_veh_inventorymonth svi
<where>
${ew.sqlSegment}
<if test="names != '' and names != null ">
and concat(svi.billNo) LIKE concat('%', #{names}, '%')
</if>
</where>
ORDER BY id DESC
</select>
<select id="selectNum" resultType="java.lang.String">
select RIGHT (billNo, 2)
from scm_veh_inventorymonth
where billNo LIKE concat(#{bill}, '%')
order by id desc
limit 1
</select>
<select id="selByMainSid"
resultType="com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthInfoVo">
SELECT receiverNames as recipient,
DATE_FORMAT(createTime, '%Y-%m-%d') AS `date`
FROM scm_veh_inventoryreport
WHERE mainSid = #{sid}
</select>
</mapper>

17
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthRest.java

@ -25,8 +25,12 @@ package com.yxt.anrui.scm.biz.scmvehinventorymonth; /***************************
*********************************************************/
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.*;
import com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
@ -101,6 +105,17 @@ public class ScmVehInventorymonthRest implements ScmVehInventorymonthFeign {
@Override
public ResultBean<PagerVo<AppScmVehInventorymonthVo>> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) {
return null;
if (StringUtils.isBlank(pagerQuery.getParams().getUserSid())) {
new ResultBean<>().success().setMsg("用户sid不能为空");
}
PagerVo<AppScmVehInventorymonthVo> page = new PagerVo<>();
IPage<AppScmVehInventorymonthVo> iPage = scmVehInventorymonthService.getCarInventoryReportList(pagerQuery);
PagerVo<AppScmVehInventorymonthVo> pagerVo = PagerUtil.pageToVo(iPage, page);
return new ResultBean<PagerVo<AppScmVehInventorymonthVo>>().success().setData(pagerVo);
}
@Override
public ResultBean<AppScmVehInventorymonthInfoVo> getCarInventoryReport(String sid) {
return scmVehInventorymonthService.getCarInventoryReport(sid);
}
}

151
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventorymonth/ScmVehInventorymonthService.java

@ -26,15 +26,21 @@
package com.yxt.anrui.scm.biz.scmvehinventorymonth;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.nacos.api.config.filter.IFilterConfig;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basevehicle.AppScmInventoryRecordsVo;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.scmvehiclegression.AppScmVehicleGressionDto;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageQuery;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleCarInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleInventory;
import com.yxt.anrui.scm.api.scmvehinventorymonth.*;
import com.yxt.anrui.scm.biz.scmvehicleinventory.ScmVehicleInventoryService;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
@ -42,18 +48,18 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonth;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthQuery;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDetailsVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthDto;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/**
@ -142,7 +148,10 @@ public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInvent
}
List<AppScmInventoryRecordsVo> list = baseVehicleFeign.selectInventoryRecords(userSid).getData();
ScmVehInventorymonth scmVehInventorymonth = new ScmVehInventorymonth();
scmVehInventorymonth.setBillNo("");
String billNo = getApplyCode();
scmVehInventorymonth.setBillNo(billNo);
scmVehInventorymonth.setCreateBySid(userSid);
scmVehInventorymonth.setState(0);
scmVehInventorymonth.setCreateOrgSid(useOrgSid);
scmVehInventorymonth.setCreateOrgName(sysStaffOrg.getOrgName());
scmVehInventorymonth.setUseOrgSid(useOrgSid);
@ -167,4 +176,132 @@ public class ScmVehInventorymonthService extends MybatisBaseService<ScmVehInvent
}
return rb.success();
}
public IPage<AppScmVehInventorymonthVo> getCarInventoryReportList(PagerQuery<AppScmVehInventorymonthQuery> pagerQuery) {
IPage<AppScmVehInventorymonthQuery> page = PagerUtil.queryToPage(pagerQuery);
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(pagerQuery.getParams().getUserSid()).getData();
AppScmVehInventorymonthQuery paramsQuery = pagerQuery.getParams();
paramsQuery.setUseOrgSid(useOrgSid);
String date = paramsQuery.getDate();
if (StringUtils.isNotBlank(date)) {
String[] s = date.split("至");
paramsQuery.setInventStartDate(s[0]);
paramsQuery.setInventEndDate(s[1]);
}
QueryWrapper<AppScmVehInventorymonthVo> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(paramsQuery.getUseOrgSid())) {
qw.eq("svi.createOrgSid", paramsQuery.getUseOrgSid());
}
if (StringUtils.isNotBlank(paramsQuery.getState())) {
qw.eq("svi.state", paramsQuery.getState());
}
String inventStartDate = paramsQuery.getInventStartDate();
String inventEndDate = paramsQuery.getInventEndDate();
qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (createTime,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(inventEndDate), "date_format (createTime,'%Y-%m-%d') <= date_format('" + inventEndDate + "','%Y-%m-%d')"
);
IPage<AppScmVehInventorymonthVo> iPage = baseMapper.getCarInventoryReportList(page, qw, paramsQuery.getNames());
for (AppScmVehInventorymonthVo record : iPage.getRecords()) {
String mainSid = record.getSid();
AppVehInventorymonthVo vo = scmVehicleInventoryService.getMonthByMainSid(mainSid);
record.setSurplusNumber(String.valueOf(vo.getSurplusNumber()));
record.setTotalNumber(String.valueOf(vo.getTotalNumber()));
record.setLossNumber(String.valueOf(vo.getLossNumber()));
record.setDamageNumber(String.valueOf(vo.getDamageNumber()));
record.setProfitNumber(String.valueOf(vo.getProfitNumber()));
record.setActualNumber(String.valueOf(vo.getProfitNumber() + vo.getNormalNumber() + vo.getDamageNumber() + vo.getLossNumber()));
if ("0".equals(record.getState())) {
if (vo.getSurplusNumber() == 0) {
record.setShowBtn(true);
} else {
record.setShowBtn(false);
}
} else {
record.setShowBtn(false);
}
String createBySid = record.getCreateBySid();
SysUserVo data = sysUserFeign.fetchBySid(createBySid).getData();
record.setName(data.getName());
}
return iPage;
}
public ResultBean<AppScmVehInventorymonthInfoVo> getCarInventoryReport(String sid) {
ResultBean<AppScmVehInventorymonthInfoVo> rb = ResultBean.fireFail();
AppScmVehInventorymonthInfoVo vo = new AppScmVehInventorymonthInfoVo();
AppScmVehInventorymonthInfoVo appScmVehInventorymonthInfoVo = baseMapper.selByMainSid(sid);
if (appScmVehInventorymonthInfoVo != null) {
vo.setRecipient(appScmVehInventorymonthInfoVo.getRecipient());
vo.setDate(appScmVehInventorymonthInfoVo.getDate());
}
AppVehInventorymonthVo appScmVehInventorymonthVo = scmVehicleInventoryService.getMonthByMainSid(sid);
//盘亏数量
vo.setLossNumber(String.valueOf(appScmVehInventorymonthVo.getLossNumber()));
//盘损数量
vo.setDamageNumber(String.valueOf(appScmVehInventorymonthVo.getDamageNumber()));
//盘盈数量
vo.setProfitNumber(String.valueOf(appScmVehInventorymonthVo.getProfitNumber()));
//实际盘库数量
vo.setActualNumber(String.valueOf(appScmVehInventorymonthVo.getProfitNumber() + appScmVehInventorymonthVo.getNormalNumber() + appScmVehInventorymonthVo.getDamageNumber() + appScmVehInventorymonthVo.getLossNumber()));
//正常数量
vo.setNormalNumber(String.valueOf(appScmVehInventorymonthVo.getNormalNumber()));
//本次应盘数量
vo.setTotalNumber(String.valueOf(appScmVehInventorymonthVo.getTotalNumber()));
String inventoryStateKey1 = "001";
String inventoryStateKey2 = "002";
String inventoryStateKey3 = "003";
List<AppVinAndRemarksVo> profitRemarks = scmVehicleInventoryService.getMonthRemarksByMainSid(sid, inventoryStateKey1);
String profitRemark = "";
for (AppVinAndRemarksVo remark : profitRemarks) {
profitRemark = remark.getVinNo() + remark.getRemarks() + "," + "\n" + profitRemark;
}
if (StringUtils.isNotBlank(profitRemark)) {
vo.setProfitRemarks(profitRemark.substring(0, profitRemark.length() - 2));
}
List<AppVinAndRemarksVo> lossRemarks = scmVehicleInventoryService.getMonthRemarksByMainSid(sid, inventoryStateKey2);
String lossRemark = "";
for (AppVinAndRemarksVo remark : lossRemarks) {
lossRemark = remark.getVinNo() + remark.getRemarks() + "," + "\n" + lossRemark;
}
if (StringUtils.isNotBlank(lossRemark)) {
vo.setLossRemarks(lossRemark.substring(0, lossRemark.length() - 2));
}
List<AppVinAndRemarksVo> damageRemarks = scmVehicleInventoryService.getMonthRemarksByMainSid(sid, inventoryStateKey3);
String damageRemark = "";
for (AppVinAndRemarksVo remark : damageRemarks) {
damageRemark = remark.getVinNo() + remark.getRemarks() + "," + "\n" + damageRemark;
}
if (StringUtils.isNotBlank(damageRemark)) {
vo.setDamageRemarks(damageRemark.substring(0, damageRemark.length() - 2));
}
return rb.success().setData(vo);
}
public String getApplyCode() {
String billNo = "";
LocalDateTime now = LocalDateTime.now(ZoneId.of("+8"));
String pattern = "yyyyMM";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
String bill = formatter.format(now);
String i = baseMapper.selectNum(bill);
if (StringUtils.isNotBlank(i)) {
billNo = getBillNo(bill, Integer.valueOf(i).intValue());
} else {
billNo = getBillNo(bill, 0);
}
return billNo;
}
public static String getBillNo(String bill, int i) {
String num = String.format("%02d", i + 1); // 不足2位补0
String billNo = bill + num;
return billNo;
}
public void updateByMainSid(String mainSid) {
baseMapper.updateByMainSid(mainSid);
}
}

5
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportRest.java

@ -97,4 +97,9 @@ public class ScmVehInventoryreportRest implements ScmVehInventoryreportFeign {
ScmVehInventoryreportDetailsVo vo = scmVehInventoryreportService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
@Override
public ResultBean sendReport(ScmVehInventoryreportDto dto) {
return scmVehInventoryreportService.sendReport(dto);
}
}

228
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehinventoryreport/ScmVehInventoryreportService.java

@ -26,24 +26,38 @@
package com.yxt.anrui.scm.biz.scmvehinventoryreport;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.portal.api.appversion.AppVersionDto;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthInfoVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.*;
import com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthService;
import com.yxt.common.base.utils.JPushServer;
import com.yxt.messagecenter.api.message.AppMessageDto;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MsgTargetUriEnum;
import com.yxt.messagecenter.api.messagelist.MessageListDto;
import com.yxt.messagecenter.api.messagelist.MessageListFeign;
import com.yxt.messagecenter.api.messagetype.MessageTypeFeign;
import com.yxt.messagecenter.api.messagetype.MessageTypeVo;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreport;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportQuery;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDetailsVo;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/**
* Project: aaa(aaa) <br/>
@ -60,51 +74,169 @@ import java.util.List;
*/
@Service
public class ScmVehInventoryreportService extends MybatisBaseService<ScmVehInventoryreportMapper, ScmVehInventoryreport> {
private QueryWrapper<ScmVehInventoryreport> createQueryWrapper(ScmVehInventoryreportQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehInventoryreport> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehInventoryreportVo> listPageVo(PagerQuery<ScmVehInventoryreportQuery> pq) {
ScmVehInventoryreportQuery query = pq.getParams();
QueryWrapper<ScmVehInventoryreport> qw = createQueryWrapper(query);
IPage<ScmVehInventoryreport> page = PagerUtil.queryToPage(pq);
IPage<ScmVehInventoryreportVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehInventoryreportVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehInventoryreportDto dto){
/**
* 消息类型:0002手机端
*/
public static final String IDENTIFIER = "0002";
@Autowired
ScmVehInventorymonthService scmVehInventorymonthService;
@Autowired
private MessageFeign messageFeign;
@Autowired
private MessageTypeFeign messageTypeFeign;
@Autowired
private MessageListFeign messageListFeign;
@Autowired
private SysUserFeign sysUserFeign;
private QueryWrapper<ScmVehInventoryreport> createQueryWrapper(ScmVehInventoryreportQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehInventoryreport> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehInventoryreportVo> listPageVo(PagerQuery<ScmVehInventoryreportQuery> pq) {
ScmVehInventoryreportQuery query = pq.getParams();
QueryWrapper<ScmVehInventoryreport> qw = createQueryWrapper(query);
IPage<ScmVehInventoryreport> page = PagerUtil.queryToPage(pq);
IPage<ScmVehInventoryreportVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehInventoryreportVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehInventoryreportDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehInventoryreportDto dto){
ScmVehInventoryreport entity = new ScmVehInventoryreport();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehInventoryreportDto dto){
String dtoSid = dto.getSid();
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehInventoryreportDto dto) {
ScmVehInventoryreport entity = new ScmVehInventoryreport();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehInventoryreportDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
ScmVehInventoryreport entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehInventoryreportDetailsVo fetchDetailsVoBySid(String sid){
ScmVehInventoryreport entity = fetchBySid(sid);
ScmVehInventoryreportDetailsVo vo = new ScmVehInventoryreportDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
}
ScmVehInventoryreport entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehInventoryreportDetailsVo fetchDetailsVoBySid(String sid) {
ScmVehInventoryreport entity = fetchBySid(sid);
ScmVehInventoryreportDetailsVo vo = new ScmVehInventoryreportDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
public ResultBean sendReport(ScmVehInventoryreportDto dto) {
ResultBean rb = ResultBean.fireFail();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getUserSid()).getData();
ScmVehInventoryreport scmVehInventoryreport = new ScmVehInventoryreport();
BeanUtil.copyProperties(dto, scmVehInventoryreport, "sid");
AppScmVehInventorymonthInfoVo data = scmVehInventorymonthService.getCarInventoryReport(dto.getMainSid()).getData();
scmVehInventoryreport.setReportContent(data.getProfitRemarks() + data.getLossRemarks() + data.getDamageRemarks());
scmVehInventorymonthService.updateByMainSid(dto.getMainSid());
List<RecipientListDto> recipientList = dto.getRecipientList();
String receiverNames = "";
String receiverSids = "";
for (RecipientListDto recipientListDto : recipientList) {
receiverNames = recipientListDto.getName() + "," + receiverNames;
receiverSids = recipientListDto.getSid() + "," + receiverSids;
}
scmVehInventoryreport.setReceiverNames(receiverNames.substring(0, receiverNames.length() - 1));
scmVehInventoryreport.setReceiverSids(receiverSids.substring(0, receiverSids.length() - 1));
save(scmVehInventoryreport);
List<String> receiveIdList = new ArrayList<>();
for (RecipientListDto recipientListDto : recipientList) {
SysUserVo sysUserVos = sysUserFeign.fetchBySid(recipientListDto.getSid()).getData();
Integer id = sysUserVos.getId();
receiveIdList.add(String.valueOf(id));
}
AppReportDto appReportDto = new AppReportDto();
appReportDto.setMsgContent(sysUserVo.getName());
appReportDto.setList(recipientList);
appReportDto.setMainSid(dto.getMainSid());
appReportDto.setReceiveIdList(receiveIdList);
// 消息推送
sendMessage(appReportDto);
return rb.success();
}
/**
* 保存消息发出推送
*
* @throws InterruptedException
*/
public void sendMessage(AppReportDto appReportDto) {
// 1、保存消息体
AppMessageDto messageDto = new AppMessageDto();
ResultBean<List<MessageTypeVo>> messageBean = messageTypeFeign.selectAppMsgTypeList(IDENTIFIER);
if (messageBean.getSuccess() && messageBean.getData() != null) {
List<MessageTypeVo> typeVoList = messageBean.getData();
for (MessageTypeVo message : typeVoList) {
if (message.getMsgType().equals("供应链")) {
messageDto.setMsgTypeSid(message.getMsgTypeSid());
messageDto.setMsgType(message.getMsgType());
}
}
}
messageDto.setMsgTitle("月度盘库报告");
messageDto.setMsgContent(appReportDto.getMsgContent() + "提交的月度盘库报告,请查阅");
messageDto.setMsgSource("供应链");
messageDto.setMsgTargetUri(MsgTargetUriEnum.GYLPKBG.getUri());
messageDto.setApp_type("2");
messageDto.setModuleSid("98ff0724-5df4-4fc7-ab6d-3996e7706acd");
JSONObject json = new JSONObject();
json.put("sid", appReportDto.getMainSid());
messageDto.setArgs_json(json.toJSONString());
String msgSid = (String) messageFeign.saveOrUpdateAppMessage(messageDto).getData();
String msgTypeSid = messageDto.getMsgTypeSid();
// 2、保存至消息列表
List<RecipientListDto> list = appReportDto.getList();
// 使用多线程保存
List<Future<?>> futures = new ArrayList<Future<?>>();
ExecutorService executor = Executors.newFixedThreadPool(4);
for (RecipientListDto recipientListDto : list) {
Future<?> f = executor.submit(new Runnable() {
@Override
public void run() {
try {
System.out.println("run start-----------------" + System.currentTimeMillis() + ":" + Thread.currentThread().getName());
MessageListDto messageList = new MessageListDto();
messageList.setMsgSid(msgSid);
messageList.setRDelStatus(0);
messageList.setSDelStatus(0);
messageList.setReceiverSid(recipientListDto.getSid());
messageListFeign.save(messageList);
// Thread.sleep(5 * 1000);
System.out.println("run end-----------------" + System.currentTimeMillis() + ":" + Thread.currentThread().getName());
} catch (Exception e) {
e.printStackTrace();
}
}
});
futures.add(f);
}
executor.shutdown();
for (int i = 0; i < appReportDto.getReceiveIdList().size(); i++) {
/**
* msgTitle:排产申请
* content:xxx的排产申请
*/
JPushServer.sendPushAlias(messageDto.getMsgTitle(), messageDto.getMsgContent(), msgTypeSid, "供应链", appReportDto.getReceiveIdList().get(i));
} // 3、推送
// JPushServer.sendPushAll(messageDto.getMsgTitle(), messageDto.getMsgContent(), msgTypeSid, messageDto.getMsgType());
// JPushServer.sendPushAlias(messageDto.getMsgTitle(), messageDto.getMsgContent(), msgSid, messageDto.getMsgType(), "23","26","66"); // 别名
System.out.println("process end");
}
}

72
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.java

@ -0,0 +1,72 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth;
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.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthQuery;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonth;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthVo;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthMapper.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthMapper <br/>
* Description: 月度日常管理记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface ScmVehPatrolinspectionmonthMapper extends BaseMapper<ScmVehPatrolinspectionmonth> {
//@Update("update scm_veh_patrolinspectionmonth set name=#{msg} where id=#{id}")
//IPage<ScmVehPatrolinspectionmonthVo> voPage(IPage<ScmVehPatrolinspectionmonth> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehPatrolinspectionmonth> qw);
IPage<ScmVehPatrolinspectionmonthVo> selectPageVo(IPage<ScmVehPatrolinspectionmonth> page, @Param(Constants.WRAPPER) Wrapper<ScmVehPatrolinspectionmonth> qw);
List<ScmVehPatrolinspectionmonthVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehPatrolinspectionmonth> qw);
@Select("select * from scm_veh_patrolinspectionmonth")
List<ScmVehPatrolinspectionmonthVo> selectListVo();
String selectNum(String bill);
IPage<AppScmVehPatrolinspectionmonthVo> getCarInspectionReportList(IPage<AppScmVehPatrolinspectionmonthQuery> page,@Param(Constants.WRAPPER) QueryWrapper<AppScmVehPatrolinspectionmonthVo> qw, @Param("names") String names);
}

42
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.xml

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo"
resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthVo">
SELECT * FROM scm_veh_patrolinspectionmonth
<where>${ew.sqlSegment}</where>
</select>
<select id="selectListAllVo"
resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthVo">
SELECT * FROM scm_veh_patrolinspectionmonth
<where>${ew.sqlSegment}</where>
</select>
<select id="selectNum" resultType="java.lang.String">
select RIGHT (billNo, 2)
from scm_veh_patrolinspectionmonth
where billNo LIKE concat(#{bill}, '%')
order by id desc
limit 1
</select>
<select id="getCarInspectionReportList"
resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthVo">
SELECT
sid,
billNo as reportId,
DATE_FORMAT(svp.createTime, '%Y-%m-%d') as `date`,
createBySid,
`state`
FROM
scm_veh_patrolinspectionmonth svp
<where>
${ew.sqlSegment}
<if test="names != '' and names != null ">
and concat(svp.billNo) LIKE concat('%', #{names}, '%')
</if>
</where>
ORDER BY id DESC
</select>
</mapper>

120
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthRest.java

@ -0,0 +1,120 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.*;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthRest <br/>
* Description: 月度日常管理记录. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "月度日常管理记录")
@RestController("com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthRest")
@RequestMapping("v1/scmvehpatrolinspectionmonth")
public class ScmVehPatrolinspectionmonthRest implements ScmVehPatrolinspectionmonthFeign {
@Autowired
private ScmVehPatrolinspectionmonthService scmVehPatrolinspectionmonthService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<ScmVehPatrolinspectionmonthVo>> listPage(@RequestBody PagerQuery<ScmVehPatrolinspectionmonthQuery> pq) {
ResultBean rb = ResultBean.fireFail();
PagerVo<ScmVehPatrolinspectionmonthVo> pv = scmVehPatrolinspectionmonthService.listPageVo(pq);
return rb.success().setData(pv);
}
@Override
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody ScmVehPatrolinspectionmonthDto dto) {
ResultBean rb = ResultBean.fireFail();
scmVehPatrolinspectionmonthService.saveOrUpdateDto(dto);
return rb.success();
}
@Override
@ApiOperation("根据sid批量删除")
@PostMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids) {
ResultBean rb = ResultBean.fireFail();
scmVehPatrolinspectionmonthService.delBySids(sids);
return rb.success();
}
@Override
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<ScmVehPatrolinspectionmonthDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) {
ResultBean rb = ResultBean.fireFail();
ScmVehPatrolinspectionmonthDetailsVo vo = scmVehPatrolinspectionmonthService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
@Override
public ResultBean getInspectionRecords(String userSid) {
return scmVehPatrolinspectionmonthService.getInspectionRecords(userSid);
}
@Override
public ResultBean<PagerVo<AppScmVehPatrolinspectionmonthVo>> getCarInspectionReportList(PagerQuery<AppScmVehPatrolinspectionmonthQuery> pagerQuery) {
if (StringUtils.isBlank(pagerQuery.getParams().getUserSid())) {
new ResultBean<>().success().setMsg("用户sid不能为空");
}
PagerVo<AppScmVehPatrolinspectionmonthVo> page = new PagerVo<>();
IPage<AppScmVehPatrolinspectionmonthVo> iPage = scmVehPatrolinspectionmonthService.getCarInspectionReportList(pagerQuery);
PagerVo<AppScmVehPatrolinspectionmonthVo> pagerVo = PagerUtil.pageToVo(iPage, page);
return new ResultBean<PagerVo<AppScmVehPatrolinspectionmonthVo>>().success().setData(pagerVo);
}
@Override
public ResultBean<AppScmVehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
return scmVehPatrolinspectionmonthService.getCarInspectionReport(sid);
}
}

254
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthService.java

@ -0,0 +1,254 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basevehicle.AppScmInventoryRecordsVo;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.scm.api.scmvehiclepatrolinspection.ScmVehiclePatrolinspection;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.ScmVehicleStayPatrolinspection;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.ScmVehicleStayPatrolinspectionVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthInfoVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthQuery;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.*;
import com.yxt.anrui.scm.biz.scmvehiclepatrolinspection.ScmVehiclePatrolinspectionService;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Collections;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionmonthService.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthService <br/>
* Description: 月度日常管理记录 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class ScmVehPatrolinspectionmonthService extends MybatisBaseService<ScmVehPatrolinspectionmonthMapper, ScmVehPatrolinspectionmonth> {
@Autowired
SysStaffOrgFeign sysStaffOrgFeign;
@Autowired
SysUserFeign sysUserFeign;
@Autowired
BaseVehicleFeign baseVehicleFeign;
@Autowired
ScmVehiclePatrolinspectionService scmVehiclePatrolinspectionService;
private QueryWrapper<ScmVehPatrolinspectionmonth> createQueryWrapper(ScmVehPatrolinspectionmonthQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehPatrolinspectionmonth> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehPatrolinspectionmonthVo> listPageVo(PagerQuery<ScmVehPatrolinspectionmonthQuery> pq) {
ScmVehPatrolinspectionmonthQuery query = pq.getParams();
QueryWrapper<ScmVehPatrolinspectionmonth> qw = createQueryWrapper(query);
IPage<ScmVehPatrolinspectionmonth> page = PagerUtil.queryToPage(pq);
IPage<ScmVehPatrolinspectionmonthVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehPatrolinspectionmonthVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehPatrolinspectionmonthDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehPatrolinspectionmonthDto dto) {
ScmVehPatrolinspectionmonth entity = new ScmVehPatrolinspectionmonth();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehPatrolinspectionmonthDto dto) {
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
ScmVehPatrolinspectionmonth entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehPatrolinspectionmonthDetailsVo fetchDetailsVoBySid(String sid) {
ScmVehPatrolinspectionmonth entity = fetchBySid(sid);
ScmVehPatrolinspectionmonthDetailsVo vo = new ScmVehPatrolinspectionmonthDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
/**
* 生成待巡检记录
*
* @param userSid
*/
@Transactional(rollbackFor = Exception.class)
public ResultBean getInspectionRecords(String userSid) {
ResultBean rb = ResultBean.fireFail();
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(userSid).getData();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData();
SysStaffOrg sysStaffOrg = sysStaffOrgFeign.getOrgByStaffSid(sysUserVo.getStaffSid()).getData();
boolean inventoryState = scmVehiclePatrolinspectionService.getPatrolinspectionState(userSid);
if (inventoryState) {
return rb.setMsg("巡检记录生成失败,有未巡检完成记录!");
}
List<AppScmInventoryRecordsVo> list = baseVehicleFeign.selectInventoryRecords(userSid).getData();
ScmVehPatrolinspectionmonth scmVehPatrolinspectionmonth = new ScmVehPatrolinspectionmonth();
String billNo = getApplyCode();
scmVehPatrolinspectionmonth.setBillNo(billNo);
scmVehPatrolinspectionmonth.setCreateBySid(userSid);
scmVehPatrolinspectionmonth.setState(0);
scmVehPatrolinspectionmonth.setCreateOrgSid(useOrgSid);
scmVehPatrolinspectionmonth.setCreateOrgName(sysStaffOrg.getOrgName());
scmVehPatrolinspectionmonth.setUseOrgSid(useOrgSid);
scmVehPatrolinspectionmonth.setUseOrgName(sysStaffOrg.getOrgName());
save(scmVehPatrolinspectionmonth);
list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) {
for (AppScmInventoryRecordsVo appScmInventoryRecordsVo : list) {
ScmVehiclePatrolinspection scmVehiclePatrolinspection = new ScmVehiclePatrolinspection();
scmVehiclePatrolinspection.setVinNo(appScmInventoryRecordsVo.getVin());
scmVehiclePatrolinspection.setMainSid(scmVehPatrolinspectionmonth.getSid());
scmVehiclePatrolinspection.setLocation(appScmInventoryRecordsVo.getWarehouse());
scmVehiclePatrolinspection.setLocationSid(appScmInventoryRecordsVo.getWarehouseSid());
scmVehiclePatrolinspection.setPatrolInspectionState("待巡检");
scmVehiclePatrolinspection.setPatrolInspectionStateKey("000");
scmVehiclePatrolinspection.setCreateOrgSid(useOrgSid);
scmVehiclePatrolinspection.setUseOrgSid(useOrgSid);
scmVehiclePatrolinspectionService.save(scmVehiclePatrolinspection);
}
} else {
return rb.setMsg("暂无需要巡检记录");
}
return rb.success();
}
public String getApplyCode() {
String billNo = "";
LocalDateTime now = LocalDateTime.now(ZoneId.of("+8"));
String pattern = "yyyyMM";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
String bill = formatter.format(now);
String i = baseMapper.selectNum(bill);
if (StringUtils.isNotBlank(i)) {
billNo = getBillNo(bill, Integer.valueOf(i).intValue());
} else {
billNo = getBillNo(bill, 0);
}
return billNo;
}
public static String getBillNo(String bill, int i) {
String num = String.format("%02d", i + 1); // 不足2位补0
String billNo = bill + num;
return billNo;
}
public IPage<AppScmVehPatrolinspectionmonthVo> getCarInspectionReportList(PagerQuery<AppScmVehPatrolinspectionmonthQuery> pagerQuery) {
IPage<AppScmVehPatrolinspectionmonthQuery> page = PagerUtil.queryToPage(pagerQuery);
String useOrgSid = sysStaffOrgFeign.getPathSidByUserSid(pagerQuery.getParams().getUserSid()).getData();
AppScmVehPatrolinspectionmonthQuery paramsQuery = pagerQuery.getParams();
paramsQuery.setUseOrgSid(useOrgSid);
String date = paramsQuery.getDate();
if (StringUtils.isNotBlank(date)) {
String[] s = date.split("至");
paramsQuery.setInventStartDate(s[0]);
paramsQuery.setInventEndDate(s[1]);
}
QueryWrapper<AppScmVehPatrolinspectionmonthVo> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(paramsQuery.getUseOrgSid())) {
qw.eq("svp.createOrgSid", paramsQuery.getUseOrgSid());
}
if (StringUtils.isNotBlank(paramsQuery.getState())) {
qw.eq("svp.state", paramsQuery.getState());
}
String inventStartDate = paramsQuery.getInventStartDate();
String inventEndDate = paramsQuery.getInventEndDate();
qw.apply(StringUtils.isNotEmpty(inventStartDate), "date_format (createTime,'%Y-%m-%d') >= date_format('" + inventStartDate + "','%Y-%m-%d')").
apply(StringUtils.isNotEmpty(inventEndDate), "date_format (createTime,'%Y-%m-%d') <= date_format('" + inventEndDate + "','%Y-%m-%d')"
);
IPage<AppScmVehPatrolinspectionmonthVo> iPage = baseMapper.getCarInspectionReportList(page, qw, paramsQuery.getNames());
for (AppScmVehPatrolinspectionmonthVo record : iPage.getRecords()) {
String mainSid = record.getSid();
VehPatrolinspectionmonthVo vo = scmVehiclePatrolinspectionService.getMonthByMainSid(mainSid);
record.setSurplusNumber(String.valueOf(vo.getSurplusNumber()));
record.setTotalNumber(String.valueOf(vo.getTotalNumber()));
record.setUnHandledNumber(String.valueOf(vo.getUnHandledNumber()));
record.setProcessedNumber(String.valueOf(vo.getProcessedNumber()));
record.setNotHandledNumber(String.valueOf(vo.getNotHandledNumber()));
record.setActualNumber(String.valueOf(vo.getTotalNumber() - vo.getNotHandledNumber()));
String createBySid = record.getCreateBySid();
SysUserVo data = sysUserFeign.fetchBySid(createBySid).getData();
record.setName(data.getName());
}
return iPage;
}
public ResultBean<AppScmVehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
ResultBean<AppScmVehPatrolinspectionmonthInfoVo> rb = ResultBean.fireFail();
AppScmVehPatrolinspectionmonthInfoVo vo = new AppScmVehPatrolinspectionmonthInfoVo();
VehPatrolinspectionmonthVo vehPatrolinspectionmonthVo = scmVehiclePatrolinspectionService.getMonthByMainSid(sid);
vo.setActualNumber(String.valueOf(vehPatrolinspectionmonthVo.getTotalNumber() - vehPatrolinspectionmonthVo.getNotHandledNumber()));
vo.setTotalNumber(String.valueOf(vehPatrolinspectionmonthVo.getTotalNumber()));
vo.setQuestion("");
return rb.success().setData(vo);
}
}

65
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportMapper.java

@ -0,0 +1,65 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreport;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportMapper.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportMapper <br/>
* Description: 日常管理报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Mapper
public interface ScmVehPatrolinspectionreportMapper extends BaseMapper<ScmVehPatrolinspectionreport> {
//@Update("update scm_veh_patrolinspectionreport set name=#{msg} where id=#{id}")
//IPage<ScmVehPatrolinspectionreportVo> voPage(IPage<ScmVehPatrolinspectionreport> page, @Param(Constants.WRAPPER) QueryWrapper<ScmVehPatrolinspectionreport> qw);
IPage<ScmVehPatrolinspectionreportVo> selectPageVo(IPage<ScmVehPatrolinspectionreport> page, @Param(Constants.WRAPPER) Wrapper<ScmVehPatrolinspectionreport> qw);
List<ScmVehPatrolinspectionreportVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<ScmVehPatrolinspectionreport> qw);
@Select("select * from scm_veh_patrolinspectionreport")
List<ScmVehPatrolinspectionreportVo> selectListVo();
}

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportMapper.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportMapper">
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo">
SELECT * FROM scm_veh_patrolinspectionreport <where> ${ew.sqlSegment} </where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo">
SELECT * FROM scm_veh_patrolinspectionreport <where> ${ew.sqlSegment} </where>
</select>
</mapper>

100
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportRest.java

@ -0,0 +1,100 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreport;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportQuery;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportDetailsVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportDto;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportFeign;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportFeignFallback.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportRest <br/>
* Description: 日常管理报告. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Api(tags = "日常管理报告")
@RestController("com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportRest")
@RequestMapping("v1/scmvehpatrolinspectionreport")
public class ScmVehPatrolinspectionreportRest implements ScmVehPatrolinspectionreportFeign {
@Autowired
private ScmVehPatrolinspectionreportService scmVehPatrolinspectionreportService;
@Override
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<ScmVehPatrolinspectionreportVo>> listPage(@RequestBody PagerQuery<ScmVehPatrolinspectionreportQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<ScmVehPatrolinspectionreportVo> pv = scmVehPatrolinspectionreportService.listPageVo(pq);
return rb.success().setData(pv);
}
@Override
@ApiOperation("新增或修改")
@PostMapping("/save")
public ResultBean save(@RequestBody ScmVehPatrolinspectionreportDto dto){
ResultBean rb = ResultBean.fireFail();
scmVehPatrolinspectionreportService.saveOrUpdateDto(dto);
return rb.success();
}
@Override
@ApiOperation("根据sid批量删除")
@PostMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids){
ResultBean rb = ResultBean.fireFail();
scmVehPatrolinspectionreportService.delBySids(sids);
return rb.success();
}
@Override
@ApiOperation("根据SID获取一条记录")
@GetMapping("/fetchDetailsBySid/{sid}")
public ResultBean<ScmVehPatrolinspectionreportDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
ResultBean rb = ResultBean.fireFail();
ScmVehPatrolinspectionreportDetailsVo vo = scmVehPatrolinspectionreportService.fetchDetailsVoBySid(sid);
return rb.success().setData(vo);
}
}

110
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportService.java

@ -0,0 +1,110 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreport;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportQuery;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportDetailsVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportDto;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportFeign;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Project: aaa(aaa) <br/>
* File: ScmVehPatrolinspectionreportService.java <br/>
* Class: com.yxt.anrui.scm.biz.scmvehpatrolinspectionreport.ScmVehPatrolinspectionreportService <br/>
* Description: 日常管理报告 业务逻辑. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2022-09-20 18:05:44 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
@Service
public class ScmVehPatrolinspectionreportService extends MybatisBaseService<ScmVehPatrolinspectionreportMapper, ScmVehPatrolinspectionreport> {
private QueryWrapper<ScmVehPatrolinspectionreport> createQueryWrapper(ScmVehPatrolinspectionreportQuery query) {
// todo: 这里根据具体业务调整查询条件
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
QueryWrapper<ScmVehPatrolinspectionreport> qw = new QueryWrapper<>();
return qw;
}
public PagerVo<ScmVehPatrolinspectionreportVo> listPageVo(PagerQuery<ScmVehPatrolinspectionreportQuery> pq) {
ScmVehPatrolinspectionreportQuery query = pq.getParams();
QueryWrapper<ScmVehPatrolinspectionreport> qw = createQueryWrapper(query);
IPage<ScmVehPatrolinspectionreport> page = PagerUtil.queryToPage(pq);
IPage<ScmVehPatrolinspectionreportVo> pagging = baseMapper.selectPageVo(page, qw);
PagerVo<ScmVehPatrolinspectionreportVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public void saveOrUpdateDto(ScmVehPatrolinspectionreportDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
this.insertByDto(dto);
return;
}
this.updateByDto(dto);
}
public void insertByDto(ScmVehPatrolinspectionreportDto dto){
ScmVehPatrolinspectionreport entity = new ScmVehPatrolinspectionreport();
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.insert(entity);
}
public void updateByDto(ScmVehPatrolinspectionreportDto dto){
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
return;
}
ScmVehPatrolinspectionreport entity = fetchBySid(dtoSid);
BeanUtil.copyProperties(dto, entity, "id", "sid");
baseMapper.updateById(entity);
}
public ScmVehPatrolinspectionreportDetailsVo fetchDetailsVoBySid(String sid){
ScmVehPatrolinspectionreport entity = fetchBySid(sid);
ScmVehPatrolinspectionreportDetailsVo vo = new ScmVehPatrolinspectionreportDetailsVo();
BeanUtil.copyProperties(entity, vo);
return vo;
}
}

10
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinspectionFeign.java

@ -59,6 +59,16 @@ public interface AppScmVehiclePatrolinspectionFeign {
@ResponseBody
public ResultBean getInspectionRecords(@PathVariable("userSid") String userSid);
@ApiOperation("手机端-获取巡检报告列表")
@PostMapping("/getCarInventoryReportList")
@ResponseBody
public ResultBean<PagerVo<VehPatrolinspectionmonthVo>> getCarInspectionReportList(@RequestBody PagerQuery<VehPatrolinspectionmonthQuery> pagerQuery);
@ApiOperation("手机端-获取巡检报告")
@GetMapping("/getCarInspectionReport/{sid}")
@ResponseBody
public ResultBean<VehPatrolinspectionmonthInfoVo> getCarInspectionReport(@PathVariable("sid") String sid);
@ApiOperation("手机端-获取巡检列表")
@PostMapping("/getInspectionList")
@ResponseBody

10
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinspectionFeignFallback.java

@ -52,6 +52,16 @@ public class AppScmVehiclePatrolinspectionFeignFallback implements AppScmVehicle
return null;
}
@Override
public ResultBean<PagerVo<VehPatrolinspectionmonthVo>> getCarInspectionReportList(PagerQuery<VehPatrolinspectionmonthQuery> pagerQuery) {
return null;
}
@Override
public ResultBean<VehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
return null;
}
@Override
public ResultBean<PagerVo<StayPatrolinspectionPageVo>> getInspectionList(PagerQuery<StayPatrolinspectionPageQuery> pagerQuery) {
return null;

19
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthInfoVo.java

@ -0,0 +1,19 @@
package com.yxt.anrui.terminal.api.supplychain.inspection;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehPatrolinspectionmonthInfoVo implements Vo {
private static final long serialVersionUID = 7694954957647668016L;
@ApiModelProperty("本次应巡检数量")
private String totalNumber;
@ApiModelProperty("实际巡检数量")
private String actualNumber;
@ApiModelProperty("存在的问题")
private String question;
}

38
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthQuery.java

@ -0,0 +1,38 @@
package com.yxt.anrui.terminal.api.supplychain.inspection;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehPatrolinspectionmonthQuery implements Query {
private static final long serialVersionUID = 5398446260642774602L;
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("报告编号/创建人")
private String names;
@ApiModelProperty("创建日期")
private String date;
@ApiModelProperty("巡检报告sid")
private String reportSid;
@ApiModelProperty("巡检状态")
private String state;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("盘库开始日期")
@JsonProperty("InventStartDate")
private String InventStartDate;
@ApiModelProperty("盘库结束日期")
@JsonProperty("InventEndDate")
private String InventEndDate;
}

33
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/VehPatrolinspectionmonthVo.java

@ -0,0 +1,33 @@
package com.yxt.anrui.terminal.api.supplychain.inspection;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehPatrolinspectionmonthVo implements Vo {
private static final long serialVersionUID = -8549821469505619262L;
private String sid;
@ApiModelProperty("编号")
private String reportId;
@ApiModelProperty("创建人员")
private String name;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建时间")
private String date;
@ApiModelProperty("剩余巡检记录数量")
private String surplusNumber;
@ApiModelProperty("巡检记录总数数量")
private String totalNumber;
@ApiModelProperty("未处理数量")
private String unHandledNumber;
@ApiModelProperty("已处理数量")
private String processedNumber;
@ApiModelProperty("未巡检数量")
private String notHandledNumber;
@ApiModelProperty("实际巡检数量")
private String actualNumber;
}

14
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeign.java

@ -94,4 +94,18 @@ public interface AppScmVehicleInventoryFeign {
@ResponseBody
public ResultBean<StayInventoryDetailedsVo> getInventoryInfo(@PathVariable("recordSid") String recordSid);
@ApiOperation("手机端-获取盘库报告列表")
@PostMapping("/getCarInventoryReportList")
@ResponseBody
public ResultBean<PagerVo<VehInventorymonthVo>> getCarInventoryReportList(@RequestBody PagerQuery<VehInventorymonthQuery> pagerQuery);
@ApiOperation("手机端-获取盘库报告")
@GetMapping("/getCarInventoryReport/{sid}")
@ResponseBody
public ResultBean<VehInventorymonthInfoVo> getCarInventoryReport(@PathVariable("sid") String sid);
@ApiOperation("发送报告")
@PostMapping("/sendReport")
@ResponseBody
public ResultBean sendReport(@RequestBody VehInventoryreportDto dto);
}

15
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/AppScmVehicleInventoryFeignFallback.java

@ -85,4 +85,19 @@ public class AppScmVehicleInventoryFeignFallback implements AppScmVehicleInvento
public ResultBean<StayInventoryDetailedsVo> getInventoryInfo(String recordSid) {
return null;
}
@Override
public ResultBean<PagerVo<VehInventorymonthVo>> getCarInventoryReportList(PagerQuery<VehInventorymonthQuery> pagerQuery) {
return null;
}
@Override
public ResultBean<VehInventorymonthInfoVo> getCarInventoryReport(String sid) {
return null;
}
@Override
public ResultBean sendReport(VehInventoryreportDto dto) {
return null;
}
}

5
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/CarInventoryListPageQuery.java

@ -11,7 +11,7 @@ public class CarInventoryListPageQuery implements Query {
private String userSid;
@ApiModelProperty("优先匹配车架号 盘库人员")
private String name;
private String names;
@ApiModelProperty("时间段 示例 2020-02-01至2022-03-31")
private String date;
@ -22,6 +22,9 @@ public class CarInventoryListPageQuery implements Query {
@ApiModelProperty("盘库状态")
private String state;
@ApiModelProperty("月度盘库sid")
private String reportSid;
@ApiModelProperty("使用组织分公司sid")
private String useOrgSid;

16
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/ReportListDto.java

@ -0,0 +1,16 @@
package com.yxt.anrui.terminal.api.supplychain.inventory;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
@Data
public class ReportListDto implements Dto {
private static final long serialVersionUID = 8433387960605551580L;
private String name;
private String sid;
}

7
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/StayInventoryDto.java

@ -15,9 +15,12 @@ public class StayInventoryDto implements Dto {
@JsonProperty(value = "sid")
private String sid;
@ApiModelProperty(value = "车架号")
@ApiModelProperty("车架号")
@JsonProperty(value = "vin")
private String mainSid;
private String vinNo; // 车架号
@ApiModelProperty("月度盘库sid")
private String mainSid; // 月度盘库sid
@ApiModelProperty(value = "存放地点")
@JsonProperty(value = "warehouse")

3
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/StayInventoryInfoVo.java

@ -56,6 +56,9 @@ public class StayInventoryInfoVo implements Vo {
@ApiModelProperty("车架号")
private String vin;
@ApiModelProperty("月度盘库sid")
private String mainSid;
@ApiModelProperty("存放地点")
private String warehouse;

33
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthInfoVo.java

@ -0,0 +1,33 @@
package com.yxt.anrui.terminal.api.supplychain.inventory;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehInventorymonthInfoVo implements Vo {
private static final long serialVersionUID = 8050057958864145264L;
@ApiModelProperty("本次应盘数量")
private String totalNumber;
@ApiModelProperty("实际盘库数量")
private String actualNumber;
@ApiModelProperty("正常数量")
private String normalNumber;
@ApiModelProperty("盘盈数量")
private String profitNumber;
@ApiModelProperty("盘亏数量")
private String lossNumber;
@ApiModelProperty("盘损数量")
private String damageNumber;
@ApiModelProperty("盘盈备注")
private String profitRemarks;
@ApiModelProperty("盘亏备注")
private String lossRemarks;
@ApiModelProperty("盘损备注")
private String damageRemarks;
@ApiModelProperty("接收人")
private String recipient;
@ApiModelProperty("创建日期")
private String date;
}

34
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthQuery.java

@ -0,0 +1,34 @@
package com.yxt.anrui.terminal.api.supplychain.inventory;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehInventorymonthQuery implements Query {
private static final long serialVersionUID = 1645260422502012478L;
@ApiModelProperty("用户sid")
private String userSid;
@ApiModelProperty("报告编号/创建人")
private String names;
@ApiModelProperty("创建日期")
private String date;
@ApiModelProperty("盘库报告sid")
private String reportSid;
@ApiModelProperty("盘库结果")
private String state;
@ApiModelProperty("使用组织名称")
private String useOrgSid;
@ApiModelProperty("盘库开始日期")
@JsonProperty("InventStartDate")
private String InventStartDate;
@ApiModelProperty("盘库结束日期")
@JsonProperty("InventEndDate")
private String InventEndDate;
}

47
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventorymonthVo.java

@ -0,0 +1,47 @@
package com.yxt.anrui.terminal.api.supplychain.inventory;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class VehInventorymonthVo implements Vo {
private static final long serialVersionUID = 4013561385922623243L;
private String sid; // sid
@ApiModelProperty("生成报告状态")
private String state;
@ApiModelProperty("编号(yyyyMMdd)")
private String reportId; // 编号(yyyyMMdd)
@ApiModelProperty("创建时间")
private String date; //
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("创建人")
private String name;
@ApiModelProperty("创建组织")
private String createOrgSid; // 创建组织
@ApiModelProperty("创建组织名称")
private String createOrgName; // 创建组织名称
@ApiModelProperty("使用组织")
private String useOrgSid; // 使用组织
@ApiModelProperty("使用组织名称")
private String useOrgName; // 使用组织名称
@ApiModelProperty("剩余盘库记录数量")
private String surplusNumber;
@ApiModelProperty("盘库记录总数数量")
private String totalNumber;
@ApiModelProperty("盘亏数量")
private String lossNumber;
@ApiModelProperty("盘损数量")
private String damageNumber;
@ApiModelProperty("盘盈数量")
private String profitNumber;
@ApiModelProperty("实盘数量")
private String actualNumber;
@ApiModelProperty("正常数量")
private String normalNumber;
@ApiModelProperty("是否显示生成报告按钮 剩余盘库记录=0时显示")
private Boolean showBtn;
}

21
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inventory/VehInventoryreportDto.java

@ -0,0 +1,21 @@
package com.yxt.anrui.terminal.api.supplychain.inventory;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class VehInventoryreportDto implements Dto {
private static final long serialVersionUID = -755912358628411197L;
private String mainSid;
@ApiModelProperty("接收人list")
private List<ReportListDto> recipientList;
private String userSid;
}

8
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/baseInfo/AppScmBaseInfoService.java

@ -3,6 +3,8 @@ package com.yxt.anrui.terminal.biz.supplychain.baseInfo;
import com.yxt.anrui.scm.api.scmvehicleenterlibrary.ScmVehicleEnterlibraryFeign;
import com.yxt.anrui.scm.api.scmvehicleexamine.ScmVehicleExamineFeign;
import com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionFeign;
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleInventory;
import com.yxt.anrui.scm.api.scmvehicleinventory.ScmVehicleInventoryFeign;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryFeign;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.ScmVehicleStayPatrolinspectionFeign;
import com.yxt.anrui.terminal.api.supplychain.baseInfo.AppScmBaseInfoVo;
@ -20,7 +22,7 @@ public class AppScmBaseInfoService {
@Autowired
ScmVehicleGressionFeign scmVehicleGressionFeign;
@Autowired
ScmVehicleStayInventoryFeign scmVehicleStayInventoryFeign;
ScmVehicleInventoryFeign scmVehicleInventoryFeign;
@Autowired
ScmVehicleStayPatrolinspectionFeign scmVehicleStayPatrolinspectionFeign;
@ -31,12 +33,12 @@ public class AppScmBaseInfoService {
String inspectedCarNum = scmVehicleExamineFeign.getToDoNum(userSid).getData();
String storageCarNum = scmVehicleEnterlibraryFeign.getToDoNum(userSid).getData();
String moveCarNum = scmVehicleGressionFeign.getToDoNum(userSid).getData();
// String inventoryCarNum = scmVehicleStayInventoryFeign.getToDoNum(userSid).getData();
String inventoryCarNum = scmVehicleInventoryFeign.getToDoNum(userSid).getData();
String inspectinoCarNum = scmVehicleStayPatrolinspectionFeign.getToDoNum(userSid).getData();
appScmBaseInfoVo.setInspectedCarNum(inspectedCarNum);
appScmBaseInfoVo.setStorageCarNum(storageCarNum);
appScmBaseInfoVo.setMoveCarNum(moveCarNum);
// appScmBaseInfoVo.setInventoryCarNum(inventoryCarNum);
appScmBaseInfoVo.setInventoryCarNum(inventoryCarNum);
appScmBaseInfoVo.setInspectinoCarNum(inspectinoCarNum);
return rb.success().setData(appScmBaseInfoVo);
}

10
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inspection/AppScmVehiclePatrolinspectionRest.java

@ -61,6 +61,16 @@ public class AppScmVehiclePatrolinspectionRest implements AppScmVehiclePatrolins
return appScmVehiclePatrolinspectionService.getInspectionRecords(userSid);
}
@Override
public ResultBean<PagerVo<VehPatrolinspectionmonthVo>> getCarInspectionReportList(PagerQuery<VehPatrolinspectionmonthQuery> pagerQuery) {
return appScmVehiclePatrolinspectionService.getCarInspectionReportList(pagerQuery);
}
@Override
public ResultBean<VehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
return appScmVehiclePatrolinspectionService.getCarInspectionReport(sid);
}
@Override
public ResultBean<PagerVo<StayPatrolinspectionPageVo>> getInspectionList(PagerQuery<StayPatrolinspectionPageQuery> pagerQuery) {
return appScmVehiclePatrolinspectionService.getInspectionList(pagerQuery);

35
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inspection/AppScmVehiclePatrolinspectionService.java

@ -36,6 +36,10 @@ import com.yxt.anrui.scm.api.scmvehiclepatrolinspectionsheet.ScmVehiclePatrolins
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.AppScmVehicleStayPatrolinspectionPageQuery;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.AppScmVehicleStayPatrolinspectionPageVo;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.ScmVehicleStayPatrolinspectionFeign;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthInfoVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthQuery;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.AppScmVehPatrolinspectionmonthVo;
import com.yxt.anrui.scm.api.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthFeign;
import com.yxt.anrui.terminal.api.supplychain.inspection.*;
import com.yxt.anrui.terminal.config.CoverUtils;
import com.yxt.common.core.query.PagerQuery;
@ -68,9 +72,11 @@ public class AppScmVehiclePatrolinspectionService {
@Autowired
ScmVehiclePatrolinspectionsheetFeign scmVehiclePatrolinspectionsheetFeign;
@Autowired
ScmVehPatrolinspectionmonthFeign scmVehPatrolinspectionmonthFeign;
public ResultBean getInspectionRecords(String userSid) {
ResultBean resultBean = scmVehicleStayPatrolinspectionFeign.getInspectionRecords(userSid);
ResultBean resultBean = scmVehPatrolinspectionmonthFeign.getInspectionRecords(userSid);
return resultBean;
}
@ -126,10 +132,31 @@ public class AppScmVehiclePatrolinspectionService {
ResultBean<AppScmVehiclePatrolinVo> rb = ResultBean.fireFail();
AppScmVehiclePatrolinVo vo = new AppScmVehiclePatrolinVo();
ResultBean<AppScmVehiclePatroVo> getInspectionInfo = scmVehiclePatrolinspectionFeign.getInspectionInfo(recordSid);
if(!getInspectionInfo.getSuccess()){
return rb.setMsg(getInspectionInfo.getMsg());
if (!getInspectionInfo.getSuccess()) {
return rb.setMsg(getInspectionInfo.getMsg());
}
BeanUtil.copyProperties(getInspectionInfo.getData(), vo);
return rb.success().setData(vo);
}
public ResultBean<PagerVo<VehPatrolinspectionmonthVo>> getCarInspectionReportList(PagerQuery<VehPatrolinspectionmonthQuery> pagerQuery) {
ResultBean<PagerVo<VehPatrolinspectionmonthVo>> rb = ResultBean.fireFail();
PagerQuery<AppScmVehPatrolinspectionmonthQuery> pq = CoverUtils.getPagerQuery(pagerQuery);
ResultBean<PagerVo<AppScmVehPatrolinspectionmonthVo>> inspectionList = scmVehPatrolinspectionmonthFeign.getCarInspectionReportList(pq);
PagerVo<VehPatrolinspectionmonthVo> vo = CoverUtils.selectPagerVo(inspectionList.getData());
return rb.success().setData(vo);
}
public ResultBean<VehPatrolinspectionmonthInfoVo> getCarInspectionReport(String sid) {
ResultBean<VehPatrolinspectionmonthInfoVo> rb = ResultBean.fireFail();
VehPatrolinspectionmonthInfoVo vo = new VehPatrolinspectionmonthInfoVo();
ResultBean<AppScmVehPatrolinspectionmonthInfoVo> resultBean = scmVehPatrolinspectionmonthFeign.getCarInspectionReport(sid);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
BeanUtil.copyProperties(getInspectionInfo.getData(),vo);
BeanUtil.copyProperties(resultBean.getData(), vo);
return rb.success().setData(vo);
}
}

15
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryRest.java

@ -101,4 +101,19 @@ public class AppScmVehicleInventoryRest implements AppScmVehicleInventoryFeign {
public ResultBean<StayInventoryDetailedsVo> getInventoryInfo(String recordSid) {
return appScmVehicleInventoryService.getInventoryInfo(recordSid);
}
@Override
public ResultBean<PagerVo<VehInventorymonthVo>> getCarInventoryReportList(PagerQuery<VehInventorymonthQuery> pagerQuery) {
return appScmVehicleInventoryService.getCarInventoryReportList(pagerQuery);
}
@Override
public ResultBean<VehInventorymonthInfoVo> getCarInventoryReport(String sid) {
return appScmVehicleInventoryService.getCarInventoryReport(sid);
}
@Override
public ResultBean sendReport(VehInventoryreportDto dto) {
return appScmVehicleInventoryService.sendReport(dto);
}
}

50
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/supplychain/inventory/AppScmVehicleInventoryService.java

@ -30,7 +30,13 @@ import com.yxt.anrui.scm.api.scmvehicleinventory.*;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageQuery;
import com.yxt.anrui.scm.api.scmvehicleinventory.AppScmVehicleStayInventoryListPageVo;
import com.yxt.anrui.scm.api.scmvehiclestayinventory.ScmVehicleStayInventoryFeign;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthInfoVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthQuery;
import com.yxt.anrui.scm.api.scmvehinventorymonth.AppScmVehInventorymonthVo;
import com.yxt.anrui.scm.api.scmvehinventorymonth.ScmVehInventorymonthFeign;
import com.yxt.anrui.scm.api.scmvehinventoryreport.RecipientListDto;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportDto;
import com.yxt.anrui.scm.api.scmvehinventoryreport.ScmVehInventoryreportFeign;
import com.yxt.anrui.terminal.api.supplychain.inventory.*;
import com.yxt.anrui.terminal.config.CoverUtils;
import com.yxt.common.core.query.PagerQuery;
@ -39,6 +45,8 @@ import com.yxt.common.core.vo.PagerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Project: anrui_scm(anrui_scm) <br/>
* File: ScmVehicleInventoryService.java <br/>
@ -64,6 +72,9 @@ public class AppScmVehicleInventoryService {
@Autowired
ScmVehInventorymonthFeign scmVehInventorymonthFeign;
@Autowired
ScmVehInventoryreportFeign scmVehInventoryreportFeign;
/**
* 手机端-判断是否生成盘库记录
*
@ -183,4 +194,43 @@ public class AppScmVehicleInventoryService {
BeanUtil.copyProperties(appScmVehicleStayInventoryDetailedsVo, vo);
return rb.success().setData(vo);
}
/**
* 盘库报告列表
*
* @param pagerQuery
* @return
*/
public ResultBean<PagerVo<VehInventorymonthVo>> getCarInventoryReportList(PagerQuery<VehInventorymonthQuery> pagerQuery) {
ResultBean<PagerVo<VehInventorymonthVo>> rb = ResultBean.fireFail();
PagerQuery<AppScmVehInventorymonthQuery> pq = CoverUtils.getPagerQuery(pagerQuery);
ResultBean<PagerVo<AppScmVehInventorymonthVo>> inspectionList = scmVehInventorymonthFeign.getCarInventoryReportList(pq);
PagerVo<VehInventorymonthVo> vo = CoverUtils.selectPagerVo(inspectionList.getData());
return rb.success().setData(vo);
}
/**
* 盘库报告
*
* @param sid
* @return
*/
public ResultBean<VehInventorymonthInfoVo> getCarInventoryReport(String sid) {
ResultBean<VehInventorymonthInfoVo> rb = ResultBean.fireFail();
VehInventorymonthInfoVo vo = new VehInventorymonthInfoVo();
ResultBean<AppScmVehInventorymonthInfoVo> resultBean = scmVehInventorymonthFeign.getCarInventoryReport(sid);
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
AppScmVehInventorymonthInfoVo appScmVehInventorymonthInfoVo = resultBean.getData();
BeanUtil.copyProperties(appScmVehInventorymonthInfoVo, vo);
return rb.success().setData(vo);
}
public ResultBean sendReport(VehInventoryreportDto dto) {
ScmVehInventoryreportDto scmVehInventoryreportDto = new ScmVehInventoryreportDto();
BeanUtil.copyProperties(dto, scmVehInventoryreportDto);
ResultBean resultBean = scmVehInventoryreportFeign.sendReport(scmVehInventoryreportDto);
return resultBean;
}
}
Loading…
Cancel
Save