diff --git a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java index c843e441..bab341a0 100644 --- a/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmImNoticeHController.java @@ -2817,7 +2817,7 @@ public class WmImNoticeHController extends BaseController { */ @RequestMapping(params = "importExcel", method = RequestMethod.POST) @ResponseBody - public AjaxJson importExcel(HttpServletRequest request, + public AjaxJson importExcel(HttpServletRequest request, HttpServletResponse response) { AjaxJson j = new AjaxJson(); MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; @@ -2921,6 +2921,7 @@ public class WmImNoticeHController extends BaseController { wmImNoticeH.setSupName(mdsup.getZhongWenQch()); } wmImNoticeH.setImCusCode(pageheader.getImCusCode()); + wmImNoticeHService.addMain(wmImNoticeH, wmImNoticeIListnew); } j.setMsg("文件导入成功!"); diff --git a/src/main/java/com/zzjee/wm/service/WmOmNoticeHServiceI.java b/src/main/java/com/zzjee/wm/service/WmOmNoticeHServiceI.java index 75cad7a9..77ba2c28 100644 --- a/src/main/java/com/zzjee/wm/service/WmOmNoticeHServiceI.java +++ b/src/main/java/com/zzjee/wm/service/WmOmNoticeHServiceI.java @@ -18,7 +18,7 @@ public interface WmOmNoticeHServiceI extends CommonService{ * 添加一对多 * */ - public void addMain(WmOmNoticeHEntity wmOmNoticeH, + public void addMain(WmOmNoticeHEntity wmOmNoticeH, List wmOmNoticeIList) ; public void addMaintms(WmTmsNoticeHEntity wmOmNoticeH, List wmOmNoticeIList) ; diff --git a/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java index ae77c05d..390da2be 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmImNoticeHServiceImpl.java @@ -39,7 +39,7 @@ public class WmImNoticeHServiceImpl extends CommonServiceImpl implements WmImNot } @Override - public void addMain(WmImNoticeHEntity wmImNoticeH, + public synchronized void addMain(WmImNoticeHEntity wmImNoticeH, List wmImNoticeIList){ //保存主信息 if(StringUtil.isEmpty(wmImNoticeH.getOrderTypeCode())){ diff --git a/src/main/java/com/zzjee/wm/service/impl/WmInQmIServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmInQmIServiceImpl.java index 3e7c56f1..431a6c7e 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmInQmIServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmInQmIServiceImpl.java @@ -26,7 +26,7 @@ public class WmInQmIServiceImpl extends CommonServiceImpl implements WmInQmIServ } @Override - public Serializable save(WmInQmIEntity entity) throws Exception{ + public synchronized Serializable save(WmInQmIEntity entity) throws Exception{ Serializable t = super.save(entity); //执行新增操作增强业务 this.doAddBus(entity); diff --git a/src/main/java/com/zzjee/wm/service/impl/WmOmNoticeHServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmOmNoticeHServiceImpl.java index 483540e4..453465f1 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmOmNoticeHServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmOmNoticeHServiceImpl.java @@ -38,7 +38,7 @@ public class WmOmNoticeHServiceImpl extends CommonServiceImpl implements WmOmNot } @Override - public void addMain(WmOmNoticeHEntity wmOmNoticeH, + public synchronized void addMain(WmOmNoticeHEntity wmOmNoticeH, List wmOmNoticeIList){ //保存主信息 this.save(wmOmNoticeH); diff --git a/src/main/java/com/zzjee/wm/service/impl/WmToDownGoodsServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmToDownGoodsServiceImpl.java index 4517007c..2b691e9d 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmToDownGoodsServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmToDownGoodsServiceImpl.java @@ -26,7 +26,7 @@ public class WmToDownGoodsServiceImpl extends CommonServiceImpl implements WmToD } @Override - public Serializable save(WmToDownGoodsEntity entity) throws Exception{ + public synchronized Serializable save(WmToDownGoodsEntity entity) throws Exception{ Serializable t = super.save(entity); //执行新增操作增强业务 this.doAddBus(entity); diff --git a/src/main/java/com/zzjee/wm/service/impl/WmToUpGoodsServiceImpl.java b/src/main/java/com/zzjee/wm/service/impl/WmToUpGoodsServiceImpl.java index 6b172c23..5d1c7029 100644 --- a/src/main/java/com/zzjee/wm/service/impl/WmToUpGoodsServiceImpl.java +++ b/src/main/java/com/zzjee/wm/service/impl/WmToUpGoodsServiceImpl.java @@ -46,7 +46,7 @@ public class WmToUpGoodsServiceImpl extends CommonServiceImpl implements WmToUpG } @Override - public Serializable save(WmToUpGoodsEntity entity) throws Exception{ + public synchronized Serializable save(WmToUpGoodsEntity entity) throws Exception{ Serializable t = super.save(entity); //执行新增操作增强业务 this.doAddBus(entity); diff --git a/src/main/java/com/zzjee/wmutil/wmUtil.java b/src/main/java/com/zzjee/wmutil/wmUtil.java index fb428ac8..0de98740 100644 --- a/src/main/java/com/zzjee/wmutil/wmUtil.java +++ b/src/main/java/com/zzjee/wmutil/wmUtil.java @@ -43,7 +43,7 @@ public class wmUtil { return list; } - public static void genrp(String datafrom,String datato,String username){ + public synchronized static void genrp(String datafrom,String datato,String username){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); String tsql = "call update_rp_period_in_out("+"'"+datafrom+"',"+"'"+datato+"',"+"'"+username+"'"+")"; @@ -54,7 +54,7 @@ public class wmUtil { } } - public static void genrp2(String datafrom, String datato, String username){ + public synchronized static void genrp2(String datafrom, String datato, String username){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); String tsql = "i"; @@ -65,7 +65,7 @@ public class wmUtil { } } - public static String getNextNoticeid(String orderType){ + public synchronized static String getNextNoticeid(String orderType){ String noticeid=null; SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); @@ -124,7 +124,7 @@ public class wmUtil { return noticeid; } - public static String getNextomNoticeIdtms(String orderType){ + public synchronized static String getNextomNoticeIdtms(String orderType){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); Map countMap = systemService .findOneForJdbc("SELECT cast(right(ifnull((om_notice_id),0),4)+1 as SIGNED) as count FROM tms_om_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW()) order by create_date desc limit 1"); @@ -162,7 +162,7 @@ public class wmUtil { } return noticeid; } - public static String getNextomNoticeId(String orderType){ + public synchronized static String getNextomNoticeId(String orderType){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); Map countMap = systemService .findOneForJdbc("SELECT cast(right(ifnull((om_notice_id),0),4)+1 as SIGNED) as count FROM wm_om_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW()) order by create_date desc limit 1");