Merge remote-tracking branch 'origin/master'

master
philip 3 years ago
commit e7cbc73296

@ -56,24 +56,30 @@ public class ExportAspect {
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
if (paramtes == null || args == null || args.length == 0) return joinPoint.proceed(); if (paramtes == null || args == null || args.length == 0) return joinPoint.proceed();
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
request.setCharacterEncoding("UTF-8");
Object[] params = new Object[1];
Map<String, Object> paramMap = new HashMap<>();
while (paramtes.hasMoreElements()) { while (paramtes.hasMoreElements()) {
String param = paramtes.nextElement(); String param = paramtes.nextElement();
String value = request.getParameter(param); String value = request.getParameter(param);
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
if (param != null && param.equals("export")) export = true; if (param != null && param.equals("export")) export = true;
if (param != null && param.equals("exportCode")) exportCode = value; if (param != null && param.equals("exportCode")) exportCode = value;
if (export && StringUtil.notEmpty(exportCode)) break;
paramMap.put(param, value);
}//while }//while
params[0] = paramMap;
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
if (export == false || StringUtil.isEmpty(exportCode)) return joinPoint.proceed(); if (export == false || StringUtil.isEmpty(exportCode)) return joinPoint.proceed();
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
for (Object arg : args) { for (Object arg : params) {
if (arg instanceof FrontPage) { if (arg instanceof FrontPage) {
((FrontPage)arg).setRows(20000); ((FrontPage)arg).setRows(20000);
} }
}//for }//for
//------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------
Object result = joinPoint.proceed(args); Object result = joinPoint.proceed(params);
JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat)); JSONObject resultJson = JSON.parseObject(JSON.toJSONStringWithDateFormat(result, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat));
if (resultJson.get("data") instanceof List) { if (resultJson.get("data") instanceof List) {
List dataList = (List)resultJson.get("data"); List dataList = (List)resultJson.get("data");

@ -58,4 +58,14 @@ public interface SfcDispatchMapper extends BaseMapper<SfcDispatch> {
SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch); SfcDispatchDto findSfcDispatchBySfc(@Param("site")String site, @Param("dto")SfcDispatchDto sfcDispatch);
List<SfcDispatch> findSplitSfcDispatch(@Param("site") String site, @Param("sfc") String sfc, @Param("stepId") int stepId); List<SfcDispatch> findSplitSfcDispatch(@Param("site") String site, @Param("sfc") String sfc, @Param("stepId") int stepId);
/**
*
*
* @param site
* @param sfc
* @param currentSeq
* @param splitQty
*/
void updateSfcDispatchQty(@Param("site") String site, @Param("sfc") String sfc, @Param("currentSeq") int currentSeq, @Param("splitQty") Float splitQty);
} }

@ -714,6 +714,9 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
shopOrderReleaseService.sfcDispatch(site, user, shopOrderModel, sfcModel, routerList); shopOrderReleaseService.sfcDispatch(site, user, shopOrderModel, sfcModel, routerList);
} }
//修改派工数量
sfcDispatchMapper.updateSfcDispatchQty(site, sfc, Integer.parseInt(stepSequence), new Float(sfcModel.getQty()));
} }
@Override @Override

@ -824,4 +824,10 @@
FROM Z_SFC_DISPATCH FROM Z_SFC_DISPATCH
WHERE SITE = #{site} AND SFC = #{sfc} AND TO_NUMBER(STEP_ID) >= #{stepId} WHERE SITE = #{site} AND SFC = #{sfc} AND TO_NUMBER(STEP_ID) >= #{stepId}
</select> </select>
<update id="updateSfcDispatchQty" >
UPDATE Z_SFC_DISPATCH SET DISPATCH_QTY = DISPATCH_QTY - #{splitQty}
WHERE SITE = #{site} AND SFC = #{sfc} AND DISPATCH_SEQ >= #{currentSeq}
</update>
</mapper> </mapper>

Loading…
Cancel
Save