|
@@ -70,6 +70,10 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
public DingElementResult findDingElements(String sopNo, Long userId) {
|
|
public DingElementResult findDingElements(String sopNo, Long userId) {
|
|
|
|
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
|
|
+ if (Objects.isNull(sopCrmInfo)) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("未找到sop单号为[%s]的派单信息", sopNo));
|
|
|
|
+ }
|
|
|
|
+
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|
|
|
|
|
|
DingElementResult dingElementResult = this.findDingRule(userId, serviceUnitId);
|
|
DingElementResult dingElementResult = this.findDingRule(userId, serviceUnitId);
|
|
@@ -174,6 +178,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
}
|
|
}
|
|
|
|
|
|
String endDate = dateFormDto.getEndDate();
|
|
String endDate = dateFormDto.getEndDate();
|
|
|
|
+ endDate = endDate.substring(5);
|
|
|
|
|
|
for (String date : dateFormList) {
|
|
for (String date : dateFormList) {
|
|
String year = date.substring(0, 4);
|
|
String year = date.substring(0, 4);
|
|
@@ -232,6 +237,10 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
public void dingSave(DingSaveParam dingSaveParam, Long userId) throws IOException {
|
|
public void dingSave(DingSaveParam dingSaveParam, Long userId) throws IOException {
|
|
String sopNo = dingSaveParam.getSopNo();
|
|
String sopNo = dingSaveParam.getSopNo();
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
|
|
+ if (Objects.isNull(sopCrmInfo)) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(String.format("未找到sop单号为[%s]的派单信息", sopNo));
|
|
|
|
+ }
|
|
|
|
+
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|
|
DingElementResult dingElementResult = this.findDingRule(userId, serviceUnitId);
|
|
DingElementResult dingElementResult = this.findDingRule(userId, serviceUnitId);
|
|
if (Objects.isNull(dingElementResult)) {
|
|
if (Objects.isNull(dingElementResult)) {
|
|
@@ -503,9 +512,9 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public int findRemainCount(Long userId, String sopNo) {
|
|
public int findRemainCount(Long userId, String sopNo) {
|
|
- // TODO: 2023/11/8 查明为什么会有sop找不到对应的派单
|
|
|
|
|
|
+ // TODO: 2023/11/8 查明为什么会有sop找不到对应的派单 (脏数据)
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
SopCrmInfo sopCrmInfo = tbCrmService.findSopCrmInfoBySop(sopNo);
|
|
- if (Objects.isNull(sopCrmInfo)){
|
|
|
|
|
|
+ if (Objects.isNull(sopCrmInfo)) {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|
|
Long serviceUnitId = sopCrmInfo.getServiceUnitId();
|