上下架读取商品名称

master
e 2019-04-24 22:53:05 +08:00
parent 55853d94d2
commit 4e14482d14
4 changed files with 67 additions and 75 deletions

View File

@ -61,9 +61,49 @@ public class wmomController {
@Autowired
SystemService systemService;
@RequestMapping(value = "/alllist/{username}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取全部订单列表信息", produces = "application/json", httpMethod = "GET")
public ResponseMessage<List<WmOmNoticeHPage>> alllist(@PathVariable("username") String username, @RequestParam int pageNumber, @RequestParam int pageSize, HttpServletRequest request) {
CriteriaQuery query = new CriteriaQuery(WmOmNoticeHEntity.class);
try {
if(StringUtil.isNotEmpty(request.getParameter("omNoticeId"))){
query.like("omNoticeId","%"+request.getParameter("omNoticeId")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvMobile"))){
query.like("delvMobile","%"+request.getParameter("delvMobile")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvMember"))){
query.like("delvMember","%"+request.getParameter("delvMember")+"%");
}
if(StringUtil.isNotEmpty(request.getParameter("delvAddr"))){
query.like("delvAddr","%"+request.getParameter("delvAddr")+"%");
}
String orgcode = "";
TSUser task = wmUtil.getsysorgcode(username);
if (task != null) {
query.like("reCarno", "%" + task.getUserName() + "%");
}
} catch (Exception e) {
}
query.add();
List<WmOmNoticeHPage> listsize = this.systemService.getListByCriteriaQuery(query, false);
query.setCurPage(pageNumber <= 0 ? 1 : pageNumber);
query.setPageSize(pageSize < 1 ? 1 : pageSize);
query.add();
Map<String, Object> map = new HashMap<String, Object>();
map.put("createDate", "desc");
query.setOrder(map);
List<WmOmNoticeHPage> list = this.systemService.getListByCriteriaQuery(query, true);
return Result.success(list, (long) listsize.size());
}
@RequestMapping(value = "/list/{username}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单列表信息", produces = "application/json", httpMethod = "GET")
@ApiOperation(value = "获取未完成订单列表信息", produces = "application/json", httpMethod = "GET")
public ResponseMessage<List<WmOmNoticeHPage>> list(@PathVariable("username") String username, @RequestParam int pageNumber, @RequestParam int pageSize, HttpServletRequest request) {
CriteriaQuery query = new CriteriaQuery(WmOmNoticeHEntity.class);
try {
@ -138,7 +178,7 @@ public class wmomController {
@RequestMapping(value = "/goodsdownlist/{orderNo}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单file信息", produces = "application/json", httpMethod = "GET")
@ApiOperation(value = "订单出库商品信息", produces = "application/json", httpMethod = "GET")
public ResponseMessage<List<WmToDownGoodsEntity>> filelist(@PathVariable("orderNo") String orderNo, HttpServletRequest request) {
String hql0 = "from WmToDownGoodsEntity where 1 = 1 AND orderId = ? ";
List<WmToDownGoodsEntity> wmToDownGoodsEntitiesList = this.systemService.findHql(hql0, orderNo);
@ -164,7 +204,7 @@ public class wmomController {
@RequestMapping(value="/getNotice/{username}", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value="附近巡检任务列表信息",produces="application/json",httpMethod="GET")
@ApiOperation(value="获取公告",produces="application/json",httpMethod="GET")
public ResponseMessage<List<TSNotice>> getNotice(@PathVariable("username") String username, HttpServletRequest request) {
List<TSNotice> list = new ArrayList<>();

View File

@ -1653,7 +1653,7 @@ public class WmImNoticeHController extends BaseController {
String message = "进货通知添加成功";
try {
String noticeid = getNextNoticeid(wmImNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode()) ;
wmImNoticeH.setNoticeId(noticeid);
WmPlatIoEntity wmPlatIo = new WmPlatIoEntity();
wmPlatIo.setCarno(wmImNoticeH.getImCarNo());
@ -1769,7 +1769,7 @@ public class WmImNoticeHController extends BaseController {
List<WmImNoticeIEntity> wmImNoticeIListnew = new ArrayList<WmImNoticeIEntity>();
wmImNoticeH.setOrderTypeCode("01");
String noticeid = getNextNoticeid(wmImNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode());
wmImNoticeH.setCusCode(ResourceUtil.getConfigByName("uas.cuscode"));
wmImNoticeH.setNoticeId(noticeid);
@ -1897,47 +1897,7 @@ public class WmImNoticeHController extends BaseController {
return new Date(time); // 将毫秒数转换成日期
}
private String getNextNoticeid(String orderType){
String noticeid=null;
Map<String, Object> countMap = systemService
.findOneForJdbc("SELECT count(*)+1 as count FROM wm_im_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());");
if (StringUtil.isEmpty(orderType)){
orderType = "01";
}
if (countMap != null) {
if(orderType.equals("03")){
noticeid = "TH"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else if(orderType.equals("01")){
noticeid = "RK"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else if(orderType.equals("04")){
noticeid = "YK"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else if(orderType.equals("09")){
noticeid = "QT"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}
}
return noticeid;
}
/**
*
*
@ -2262,7 +2222,7 @@ private String getNextNoticeid(String orderType){
WmImNoticeHEntity wmImNoticeH = new WmImNoticeHEntity();
wmImNoticeH.setOrderTypeCode(pageheader.getOrderTypeCode());
String noticeid = getNextNoticeid(wmImNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextNoticeid(wmImNoticeH.getOrderTypeCode());
wmImNoticeH.setCusCode(pageheader.getCusCode());
wmImNoticeH.setNoticeId(noticeid);
wmImNoticeH.setImData(pageheader.getImData());

View File

@ -901,7 +901,7 @@ public class WmOmNoticeHController extends BaseController {
AjaxJson j = new AjaxJson();
String message = "添加成功";
try{
String noticeid = getNextNoticeId(wmOmNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode());
WmPlatIoEntity wmPlatIo = new WmPlatIoEntity();
wmPlatIo.setCarno(wmOmNoticeH.getReCarno());
wmPlatIo.setDocId(noticeid);
@ -961,30 +961,7 @@ public class WmOmNoticeHController extends BaseController {
j.setMsg(message);
return j;
}
private String getNextNoticeId(String orderType){
Map<String, Object> countMap = systemService
.findOneForJdbc("SELECT count(*)+1 as count FROM wm_om_notice_h t where TO_DAYS(t.create_date) = TO_DAYS(NOW());");
String noticeid = null;
if (StringUtil.isEmpty(orderType)){
orderType = "11";
}
if(orderType.equals("19")){
noticeid = "QT"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else {
noticeid = "CK"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}
return noticeid;
}
@RequestMapping(params = "doGet")
@ResponseBody
public AjaxJson dogetfromother(String formDate, HttpServletRequest request) {
@ -1026,7 +1003,7 @@ public class WmOmNoticeHController extends BaseController {
wmOmNoticeH.setOmPlatNo(Integer.toString(billResult.getData().get(s).getPiId()));
wmOmNoticeH.setOrderTypeCode("11");
wmOmNoticeH.setCusCode(ResourceUtil.getConfigByName("uas.cuscode"));
String noticeid = getNextNoticeId(wmOmNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode());
wmOmNoticeH.setOmNoticeId(noticeid);
wmOmNoticeH.setPiClass(billResult.getData().get(s).getPiClass());
wmOmNoticeH.setPiMaster(master);
@ -2159,7 +2136,7 @@ public class WmOmNoticeHController extends BaseController {
wmOmNoticeH.setDelvData(pageheader.getImData());
wmOmNoticeH.setOrderTypeCode(pageheader.getOrderTypeCode());
wmOmNoticeH.setCusCode(pageheader.getCusCode());
String noticeid = getNextNoticeId(wmOmNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode());
wmOmNoticeH.setOmNoticeId(noticeid);
wmOmNoticeH.setOmBeizhu(pageheader.getImBeizhu());
wmOmNoticeH.setOcusCode(pageheader.getSupCode());
@ -2294,7 +2271,7 @@ public class WmOmNoticeHController extends BaseController {
wmOmNoticeH.setDelvData(pageheader.getImData());
wmOmNoticeH.setOrderTypeCode(pageheader.getOrderTypeCode());
wmOmNoticeH.setCusCode(pageheader.getCusCode());
String noticeid = getNextNoticeId(wmOmNoticeH.getOrderTypeCode());
String noticeid = wmUtil.getNextomNoticeId(wmOmNoticeH.getOrderTypeCode());
wmOmNoticeH.setOmNoticeId(noticeid);
wmOmNoticeH.setOmBeizhu(pageheader.getImBeizhu());
wmOmNoticeH.setOcusCode(pageheader.getSupCode());

View File

@ -89,8 +89,16 @@ public class wmUtil {
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else {
noticeid = "QT"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}
}
return noticeid;
}
@ -111,13 +119,20 @@ public class wmUtil {
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else {
}else if (orderType.equals("11")){
noticeid = "CK"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}else {
noticeid = "QT"
+ DateUtils.date2Str(new Date(), DateUtils.yyyyMMdd)
+ "-"
+ StringUtil.leftPad(
((Long) countMap.get("count")).intValue(), 4,
'0');
}
return noticeid;
}