Merge remote-tracking branch 'origin/master'

master
philip 3 years ago
commit a3c4a9555c

@ -352,7 +352,6 @@ public class AbnormalBillController {
return R.ok(abnormalBillService.anomalyReveseRepair(abnormalBill,abnormalBillDispose));
}
@GetMapping("/findNcCodeDescriptionByNcCode")
public R findNcCodeDescriptionByNcCode(String ncCode){
return R.ok(ncCodeService.findNcCodeDescriptionByNcCode(ncCode));

@ -106,6 +106,12 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
returnStatus = true;
resourceInspectPlan.setStatus("401");
}else{
ResourceInspectTask resourceInspectTask = new ResourceInspectTask();
resourceInspectTask.setResourceInspectPlanBo(planHandle.getHandle());
List<ResourceInspectTask> resourceInspectTasks = resourceInspectTaskService.selectList(resourceInspectTask);
if (!planHandle.getScheduleType().equals(resourceInspectPlan.getScheduleType()) && resourceInspectTasks.size() > 0){
throw BusinessException.build("已创建任务的点检计划,不能修改排程方式!");
}
// 保留创建人员和创建时间
String createUser = planHandle.getCreateUser();
LocalDateTime createdDateTime = planHandle.getCreatedDateTime();
@ -300,6 +306,9 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
ResourceInspectTask equipInspectTask = setResourceInspectTask(resourceInspectPlan, resourceInspectTask,sign);
resourceInspectTaskList.add(equipInspectTask);
taskCreateDate = addTime(frequencyUnit,frequency,taskCreateDate);
if (taskCreateDate.isAfter(indateEnd)){
break;
}
taskNum--;
}
}else{
@ -313,12 +322,18 @@ public class ResourceInspectPlanServiceImpl extends ServiceImpl<ResourceInspectP
ResourceInspectTask equipInspectTask = setResourceInspectTask(resourceInspectPlan, resourceInspectTask,sign);
resourceInspectTaskList.add(equipInspectTask);
taskCreateDate = addTime(frequencyUnit,frequency,taskCreateDate);
if (taskCreateDate.isAfter(indateEnd)){
break;
}
}
}else {
while (taskCreateDate.isBefore(createdDateTime)){
taskCreateDate = addTime(frequencyUnit,frequency,taskCreateDate);
}
for (int i = 0;i < taskNum;i++){
if (taskCreateDate.isAfter(indateEnd)){
break;
}
resourceInspectTask.setTaskCreateDate(taskCreateDate);
ResourceInspectTask equipInspectTask = setResourceInspectTask(resourceInspectPlan, resourceInspectTask,sign);
resourceInspectTaskList.add(equipInspectTask);

@ -712,9 +712,13 @@
<select id="getInspectTaskList" resultType="com.foreverwin.mesnac.equip.model.ResourceInspectTask">
SELECT * FROM WIP.Z_RESOURCE_INSPECT_TASK ZRIT
WHERE ZRIT.SITE = #{site}
AND ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo}
AND ZRIT.RESRCE = #{resrce}
AND ZRIT.STATUS IN ('DOING','NEW')
AND ZRIT.STATUS IN ('DOING','NEW')
<if test="resourceInspectPlanBo != null and resourceInspectPlanBo != ''">
AND ZRIT.RESOURCE_INSPECT_PLAN_BO = #{resourceInspectPlanBo}
</if>
<if test="resrce != null and resrce != ''">
AND ZRIT.resrce = #{resrce}
</if>
</select>
<!--自定义sql-->

Loading…
Cancel
Save