Commit 03d02cd4 by wuwenlong

生产计划排产

parent 7a186899
......@@ -82,10 +82,10 @@ public class ServiceHGSC005A extends ServiceBase {
String planCode = inInfo.getString(HGSC005.FIELD_plan_code);
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
this.checkScheduleData(hgsc005);
HGSCTools.THGSC005A.schedule(planCode);
int count = HGSCTools.THGSC005A.schedule(planCode);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
// inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据排产成功!");
inInfo.setMsg("操作成功!本次对[" + count + "]条数据排产成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
......
......@@ -338,7 +338,7 @@ public class HGSCTools {
//基础工时
private final static BigDecimal baseWorkHour = new BigDecimal(8);
public static void schedule(String planCode) {
public static int schedule(String planCode) {
List<HGSC005A> hgsc005AList = queryByPlanCode(planCode);
hgsc005AList.sort(Comparator.comparing(HGSC005A::getProductType).thenComparing(HGSC005A::getProcessOrder,Comparator.reverseOrder()));
//通过工序编码查询工序设置
......@@ -372,6 +372,7 @@ public class HGSCTools {
minDate = DateUtil.toDate(planInfo.getPlanStartDate(),DateUtil.DATE10_PATTERN).compareTo(DateUtil.toDate(minDate,DateUtil.DATE10_PATTERN)) <=0?planInfo.getPlanStartDate():minDate;
DaoUtils.update(HGSC005A.UPDATE,planInfo);
}
return hgsc005AList.size();
}
private static BigDecimal calculateWordHour(HGSC005A planInfo, List<HGSJ001> hgsj001List
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment