From 85ca24ecedb4a27118491cac2f6cb38dd80743de Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期四, 13 六月 2024 15:26:19 +0800 Subject: [PATCH] # --- src/main/webapp/views/locMast/locMast.html | 13 + src/main/java/com/zy/asrs/controller/LocMastController.java | 9 + src/main/resources/mapper/BasWhsMapper.xml | 8 + src/main/java/com/zy/asrs/service/BasWhsService.java | 2 src/main/webapp/static/js/stoMan/stoQue.js | 24 +- src/main/webapp/views/locMast/locMast_detail.html | 6 src/main/java/com/zy/asrs/mapper/BasWhsMapper.java | 3 src/main/java/com/zy/asrs/entity/RowLastnoType.java | 9 src/main/java/com/zy/asrs/service/impl/BasWhsServiceImpl.java | 6 src/main/java/com/zy/asrs/entity/BasWhs.java | 12 + src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java | 2 src/main/webapp/views/stoMan/stoQue.html | 11 + src/main/webapp/static/js/locMast/locMast.js | 30 +- src/main/java/com/zy/asrs/entity/LocMast.java | 6 src/main/java/com/zy/common/service/CommonService.java | 309 +++++++++++++++++++++++++++++++++++++ 15 files changed, 404 insertions(+), 46 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java index 2d82d5e..f8ab79b 100644 --- a/src/main/java/com/zy/asrs/controller/LocMastController.java +++ b/src/main/java/com/zy/asrs/controller/LocMastController.java @@ -10,9 +10,11 @@ import com.core.common.Cools; import com.core.common.DateUtils; import com.core.common.R; +import com.zy.asrs.entity.BasWhs; import com.zy.asrs.entity.LocDetl; import com.zy.asrs.entity.LocMast; import com.zy.asrs.entity.param.LocMastInitParam; +import com.zy.asrs.service.BasWhsService; import com.zy.asrs.service.LocDetlService; import com.zy.asrs.service.LocMastService; import com.zy.asrs.utils.Utils; @@ -32,6 +34,8 @@ private LocMastService locMastService; @Autowired private LocDetlService locDetlService; + @Autowired + private BasWhsService basWhsService; @RequestMapping(value = "/locMast/init/pwd") public R locMastInitPwd(@RequestParam(required = false) String pwd) { @@ -177,6 +181,10 @@ // @Transactional public R init(LocMastInitParam param) { List<LocMast> list = new ArrayList<>(); + BasWhs basWhs = basWhsService.selectByIdentifying(param.getIdentifying()); + if (Cools.isEmpty(basWhs)){ + return R.error("搴撳瀷涓嶅瓨鍦紒锛侊紒"); + } for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ for (int b=param.getStartBay(); b<=param.getEndBay(); b++) { for (int l=param.getStartLev(); l<=param.getEndLev(); l++) { @@ -212,6 +220,7 @@ locMast.setAppeTime(now); locMast.setModiUser(getUserId()); locMast.setModiTime(now); + locMast.setWhsType(basWhs.getId()); list.add(locMast); } } diff --git a/src/main/java/com/zy/asrs/entity/BasWhs.java b/src/main/java/com/zy/asrs/entity/BasWhs.java index 1ea0824..1945dc2 100644 --- a/src/main/java/com/zy/asrs/entity/BasWhs.java +++ b/src/main/java/com/zy/asrs/entity/BasWhs.java @@ -61,6 +61,12 @@ @TableField("appe_time") private Date appeTime; + /** + * 鏍囪瘑 + */ + @ApiModelProperty(value= "鏍囪瘑") + private String identifying; + public BasWhs() {} public BasWhs(String whsDesc,Long modiUser,Date modiTime,Long appeUser,Date appeTime) { @@ -159,5 +165,11 @@ this.appeTime = appeTime; } + public String getIdentifying() { + return identifying; + } + public void setIdentifying(String identifying) { + this.identifying = identifying; + } } diff --git a/src/main/java/com/zy/asrs/entity/LocMast.java b/src/main/java/com/zy/asrs/entity/LocMast.java index 23d8301..a62b9cd 100644 --- a/src/main/java/com/zy/asrs/entity/LocMast.java +++ b/src/main/java/com/zy/asrs/entity/LocMast.java @@ -80,6 +80,12 @@ private Integer lev1; /** + * 缁� + */ + @ApiModelProperty(value= "缁�") + private Integer gro1; + + /** * 婊℃澘 */ @ApiModelProperty(value= "婊℃澘") diff --git a/src/main/java/com/zy/asrs/entity/RowLastnoType.java b/src/main/java/com/zy/asrs/entity/RowLastnoType.java index b7e5488..e3a822d 100644 --- a/src/main/java/com/zy/asrs/entity/RowLastnoType.java +++ b/src/main/java/com/zy/asrs/entity/RowLastnoType.java @@ -9,11 +9,6 @@ import java.text.SimpleDateFormat; import java.util.Date; import org.springframework.format.annotation.DateTimeFormat; -import com.core.common.SpringUtils; -import com.zy.system.service.UserService; -import com.zy.system.entity.User; -import java.text.SimpleDateFormat; -import java.util.Date; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -77,9 +72,9 @@ private Date appeTime; /** - * 搴撳瀷 0: 鏍囧噯鍫嗗灈鏈哄簱 1: 骞冲簱 2: 绌挎鏉� 3: 鍥涘悜杞� 4: AGV 5: 鏈煡 + * 搴撳瀷 1: 鏍囧噯鍫嗗灈鏈哄簱 2: 骞冲簱 3: 绌挎鏉� 4: 鍥涘悜杞� 5: AGV 0: 鏈煡 */ - @ApiModelProperty(value= "搴撳瀷 0: 鏍囧噯鍫嗗灈鏈哄簱 1: 骞冲簱 2: 绌挎鏉� 3: 鍥涘悜杞� 4: AGV 5: 鏈煡 ") + @ApiModelProperty(value= "搴撳瀷 1: 鏍囧噯鍫嗗灈鏈哄簱 2: 骞冲簱 3: 绌挎鏉� 4: 鍥涘悜杞� 5: AGV 0: 鏈煡 ") private Integer type; public RowLastnoType() {} diff --git a/src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java b/src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java index ace149b..3727293 100644 --- a/src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java +++ b/src/main/java/com/zy/asrs/entity/param/LocMastInitParam.java @@ -46,6 +46,8 @@ private Integer endCrn; + private String identifying; + public Integer getStartRow() { if (null == startRow) { throw new CoolException(BaseRes.PARAM); diff --git a/src/main/java/com/zy/asrs/mapper/BasWhsMapper.java b/src/main/java/com/zy/asrs/mapper/BasWhsMapper.java index d55ca5b..e59c57c 100644 --- a/src/main/java/com/zy/asrs/mapper/BasWhsMapper.java +++ b/src/main/java/com/zy/asrs/mapper/BasWhsMapper.java @@ -3,10 +3,13 @@ import com.baomidou.mybatisplus.mapper.BaseMapper; import com.zy.asrs.entity.BasWhs; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @Mapper @Repository public interface BasWhsMapper extends BaseMapper<BasWhs> { + BasWhs selectByIdentifying(@Param("identifying") String identifying); + } diff --git a/src/main/java/com/zy/asrs/service/BasWhsService.java b/src/main/java/com/zy/asrs/service/BasWhsService.java index 2e4f77a..33e2599 100644 --- a/src/main/java/com/zy/asrs/service/BasWhsService.java +++ b/src/main/java/com/zy/asrs/service/BasWhsService.java @@ -4,5 +4,5 @@ import com.zy.asrs.entity.BasWhs; public interface BasWhsService extends IService<BasWhs> { - + BasWhs selectByIdentifying(String Identifying); } diff --git a/src/main/java/com/zy/asrs/service/impl/BasWhsServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/BasWhsServiceImpl.java index ef706d4..154d8d9 100644 --- a/src/main/java/com/zy/asrs/service/impl/BasWhsServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/BasWhsServiceImpl.java @@ -1,5 +1,6 @@ package com.zy.asrs.service.impl; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.zy.asrs.entity.BasWhs; import com.zy.asrs.mapper.BasWhsMapper; @@ -8,5 +9,8 @@ @Service("basWhsService") public class BasWhsServiceImpl extends ServiceImpl<BasWhsMapper, BasWhs> implements BasWhsService { - + @Override + public BasWhs selectByIdentifying(String identifying) { + return this.baseMapper.selectByIdentifying(identifying); + } } diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index e89c3f9..6aa2a28 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -125,14 +125,11 @@ RowLastno rowLastno = rowLastnoService.selectById(whsType); RowLastnoType rowLastnoType = rowLastnoTypeService.selectById(rowLastno.getTypeId()); /** - * 搴撳瀷 0: 鏍囧噯鍫嗗灈鏈哄簱 1: 骞冲簱 2: 绌挎鏉� 3: 鍥涘悜杞� 4: AGV 5: 鏈煡 + * 搴撳瀷 1: 鏍囧噯鍫嗗灈鏈哄簱 2: 骞冲簱 3: 绌挎鏉� 4: 鍥涘悜杞� 5: AGV 0: 鏈煡 */ switch (rowLastnoType.getType()){ - case 0: - return getLocNoRun(whsType,staDescId,sourceStaNo,matnr,batch,grade,0,locTypeDto,0); case 1: - log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo); - break; + return getLocNoRun(whsType,staDescId,sourceStaNo,matnr,batch,grade,0,locTypeDto,0); case 2: log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo); break; @@ -140,8 +137,7 @@ log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo); break; case 4: - log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo); - break; + return getLocNoRun2(whsType,staDescId,sourceStaNo,matnr,batch,grade,0,locTypeDto,0); case 5: log.error("绔欑偣={} 鏈煡璇㈠埌瀵瑰簲鐨勮鍒�",sourceStaNo); break; @@ -453,4 +449,303 @@ startupDto.setLocNo(locNo); return startupDto; } + + /** + * 妫�绱㈠簱浣嶅彿 + * + * @param whsType 绫诲瀷 1:鍙屾繁寮忚揣鏋� + * @param staDescId 璺緞ID + * @param sourceStaNo 婧愮珯 + * @param matnr 鐗╂枡鍙烽泦鍚� + * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿 + */ + @Transactional + public StartupDto getLocNoRun2(Integer whsType, Integer staDescId, Integer sourceStaNo, String matnr, String batch, String grade, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { + if (Cools.isEmpty(matnr)) { //鐗╂枡鍙� + matnr = ""; + } + if (Cools.isEmpty(batch)) { //鎵规 + batch = ""; + } + if (Cools.isEmpty(grade)) { //澶囩敤 + grade = ""; + } + + // 鍒濆鍖栧弬鏁� + int crnNo = 0; //鍫嗗灈鏈哄彿 + int nearRow = 0; //鏈�娴呭簱浣嶆帓 + int curRow = 0; //鏈�娣卞簱浣嶆帓 + int rowCount = 0; //杞杞 + LocMast locMast = null; // 鐩爣搴撲綅 + + StartupDto startupDto = new StartupDto(); + RowLastno rowLastno = rowLastnoService.selectById(whsType); + int sRow = rowLastno.getsRow(); + int eRow = rowLastno.geteRow(); + int crnNumber = rowLastno.getCrnQty(); + + if (Cools.isEmpty(rowLastno)) { + throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�"); + } + // ===============>>>> 寮�濮嬫墽琛� + curRow = rowLastno.getCurrentRow(); + + if (!Cools.isEmpty(moveCrnNo) && moveCrnNo!=0){ + crnNumber = moveCrnNo; + if (times==0){ + curRow = moveCrnNo*4-1; + }else { + curRow = moveCrnNo*4-2; + } + } + + //姝ょ▼搴忕敤浜庝紭鍖栧爢鍨涙満寮傚父鏃剁殑杩愯鏃堕棿 + for (int i = times; i < crnNumber*2; i++) { + int[] locNecessaryParameters = Utils.LocNecessaryParameters(whsType, curRow, crnNumber); + curRow = locNecessaryParameters[1]; + crnNo = locNecessaryParameters[2]; + if (basCrnpService.checkSiteError(crnNo, true)) { + rowCount = locNecessaryParameters[0]; + nearRow = locNecessaryParameters[3]; + List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); + int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type",100)); + if (locMasts.size()-crnCountO<=2){ + times++; + continue; + } + break; + } else { + times++; + } + } + if (nearRow == 0) { + throw new CoolException("鏃犲彲鐢ㄥ爢鍨涙満"); + } + + boolean signRule1 = false; + boolean signRule2 = false; + + + if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ + // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� //鍒嗙鐗� + if (!Cools.isEmpty(matnr) && staDescId == 1){ + signRule1 = true; + } + // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� //浜掗�氱増 + if (!Cools.isEmpty(matnr) && staDescId == 1) { + signRule2 = true; + } + + if (!Cools.isEmpty(matnr) && (staDescId == 11 || staDescId == 111)) { + signRule1 = true; + } + } + + if (signRule1){ + if (nearRow!=curRow){ + List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); + for (LocMast locMast1:locMasts){ + //鑾峰彇宸烽亾 + List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow); + //鑾峰彇鐩爣搴撲綅鎵�鍦ㄥ贩閬撴渶娴呴潪绌哄簱浣� + LocMast locMastF = locMastService.selectLocByLocStsPakInF(curRow,nearRow,groupOutsideLocCrn); + if (!Cools.isEmpty(locMastF) && locMastF.getLocSts().equals("F")){ + LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMastF.getLocNo())); + if (!Cools.isEmpty(locDetl) && matnr.equals(locDetl.getMatnr()) && batch.equals(Cools.isEmpty(locDetl.getBatch()) ? "" : locDetl.getBatch()) && grade.equals(Cools.isEmpty(locDetl.getBrand()) ? "" : locDetl.getBrand())) { + //鑾峰彇鐩爣搴撲綅鎵�鍦ㄥ贩閬撴渶娴呴潪绌哄簱浣� + locMast = locMastService.selectLocByLocStsPakInO(curRow,nearRow,groupOutsideLocCrn); + break; + } + } + } + } + }else if (signRule2){ + List<String> locNos = locDetlService.getSameDetlToday(matnr, sRow, eRow); + for (String locNo : locNos) { + if (Utils.isShallowLoc(slaveProperties, locNo)) { + continue; + } + String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo); + // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣� + LocMast shallowLoc = locMastService.selectById(shallowLocNo); + if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { + if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { + if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { + locMast = shallowLoc; + crnNo = locMast.getCrnNo(); + break; + } + } + } + } + } + +// // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 //鍒嗙鐗� +// if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(whsType)) { +// List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O")); +// for (LocMast locMast1:locMasts){ +// if (VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { +// continue; +// } +// String shallowLoc = Utils.getDeepLoc(slaveProperties,locMast1.getLocNo()); +// LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no",shallowLoc)); +// if (!Cools.isEmpty(locMast2) && locMast2.getLocSts().equals("D")){ +// locMast = locMast1; +// break; +// } +// } +// } + + // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 //浜掗�氱増 + if (staDescId == 10 && Utils.BooleanWhsTypeStaIoType(rowLastno)) { + List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); + if (!locMasts.isEmpty()) { + for (LocMast loc : locMasts) { + if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { + continue; + } + String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); + // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣� + LocMast shallowLoc = locMastService.selectById(shallowLocNo); + if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { + if (VersionUtils.locMoveCheckLocTypeComplete(shallowLoc, locTypeDto)) { + if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { + locMast = shallowLoc; + crnNo = locMast.getCrnNo(); + break; + } + } + } + } + } + } + + Wrapper<StaDesc> wrapper = null; + StaDesc staDesc = null; + BasDevp staNo = null; + + if (Utils.BooleanWhsTypeSta(rowLastno, staDescId)) { + // 鑾峰彇鐩爣绔� + wrapper = new EntityWrapper<StaDesc>() + .eq("type_no", staDescId) + .eq("stn_no", sourceStaNo) + .eq("crn_no", crnNo); + staDesc = staDescService.selectOne(wrapper); + if (Cools.isEmpty(staDesc)) { + log.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); +// throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�"); + crnNo = 0; + }else { + staNo = basDevpService.selectById(staDesc.getCrnStn()); + if (!staNo.getAutoing().equals("Y")) { + log.error("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�"); +// throw new CoolException("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�"); + crnNo = 0; + } + startupDto.setStaNo(staNo.getDevNo()); + } + // 鏇存柊搴撲綅鎺掑彿 + if (Cools.isEmpty(locMast)){ + rowLastno.setCurrentRow(curRow); + rowLastnoService.updateById(rowLastno); + } + } + + // 寮�濮嬫煡鎵惧簱浣� ==============================>> + + // 1.鎸夎鍒欐煡鎵惧簱浣� + if (Cools.isEmpty(locMast) && crnNo != 0) { + List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() + .eq("row1", nearRow) + .eq("loc_sts", "O") + .orderBy("lev1",true).orderBy("bay1",true)); + for (LocMast locMast1 : locMasts) { + if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { + continue; + } + if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ + String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); + LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() + .eq("loc_no", shallowLoc).eq("loc_sts", "O")); + if (!Cools.isEmpty(locMast2)) { + locMast = locMast2; + break; + } + } else { + if (!Cools.isEmpty(locMast1)) { + locMast = locMast1; + break; + } + } + } + + if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)){ + for (LocMast locMast1 : locMasts) { + if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { + continue; + } + if (Utils.BooleanWhsTypeStaIoType(rowLastno)){ + String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); + LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() + .eq("loc_no", shallowLoc).eq("loc_sts", "O")); + if (!Cools.isEmpty(locMast2)) { + locMast = locMast2; + break; + } else { + locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() + .eq("loc_no", shallowLoc).eq("loc_sts", "F")); + if (!Cools.isEmpty(locMast2)) { + locMast = locMast2; + break; + } else { + locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() + .eq("loc_no", shallowLoc).eq("loc_sts", "D")); + if (!Cools.isEmpty(locMast2)) { + locMast = locMast2; + break; + } + } + } + } else { + if (!Cools.isEmpty(locMast1)) { + locMast = locMast1; + break; + } + } + } + } + } + + if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) { + locMast = null; + } + + // 閫掑綊鏌ヨ + if (Cools.isEmpty(locMast) || !locMast.getLocSts().equals("O")) { + // 褰撳墠宸烽亾鏃犵┖搴撲綅鏃讹紝閫掑綊璋冩暣鑷充笅涓�宸烽亾锛屾绱㈠叏閮ㄥ贩閬撴棤鏋滃悗锛岃烦鍑洪�掑綊 + if (times < rowCount*2) { + times = times + 1; + return getLocNoRun(whsType, staDescId, sourceStaNo, matnr, batch, grade,moveCrnNo, locTypeDto, times); + } +// // 2.搴撲綅褰撳墠鎵�灞炲昂瀵告棤绌哄簱浣嶆椂锛岃皟鏁村昂瀵稿弬鏁帮紝鍚戜笂鍏煎妫�绱㈠簱浣� +// if (locTypeDto.getLocType1() < 2) { +// int i = locTypeDto.getLocType1() + 1; +// locTypeDto.setLocType1((short)i); +// return getLocNo(1, staDescId, sourceStaNo, matnr,batch,grade, locTypeDto, 0); +// } + log.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times); + throw new CoolException("娌℃湁绌哄簱浣�"); + } + String locNo = locMast.getLocNo(); + + // 鐢熸垚宸ヤ綔鍙� + int workNo = getWorkNo(0); + // 杩斿洖dto + startupDto.setWorkNo(workNo); + startupDto.setCrnNo(crnNo); + startupDto.setSourceStaNo(sourceStaNo); + startupDto.setLocNo(locNo); + return startupDto; + } + } diff --git a/src/main/resources/mapper/BasWhsMapper.xml b/src/main/resources/mapper/BasWhsMapper.xml index ce21ba3..2017ad2 100644 --- a/src/main/resources/mapper/BasWhsMapper.xml +++ b/src/main/resources/mapper/BasWhsMapper.xml @@ -10,7 +10,15 @@ <result column="modi_time" property="modiTime" /> <result column="appe_user" property="appeUser" /> <result column="appe_time" property="appeTime" /> + <result column="identifying" property="identifying" /> </resultMap> + <select id="selectByIdentifying" resultMap="BaseResultMap"> + select top 1 * + from asr_bas_whs + where 1=1 + and identifying = #{identifying} + </select> + </mapper> diff --git a/src/main/webapp/static/js/locMast/locMast.js b/src/main/webapp/static/js/locMast/locMast.js index a03ab95..a6d4eb7 100644 --- a/src/main/webapp/static/js/locMast/locMast.js +++ b/src/main/webapp/static/js/locMast/locMast.js @@ -21,30 +21,30 @@ cols: [[ {type: 'checkbox', fixed: 'left'} // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} - ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�',sort:true} - ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��',width:200} - // ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷'} + ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�',sort:true, hide:false} + ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��',width:200, hide:false} + ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷',width:200, hide:false} // ,{field: 'pltType', align: 'center',title: ''} // ,{field: 'ctnType', align: 'center',title: ''} // ,{field: 'locSts', align: 'center',title: ''} // ,{field: 'sheetNo', align: 'center',title: ''} - ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿'} - ,{field: 'row1', align: 'center',title: '鎺�', sort:true} - ,{field: 'bay1', align: 'center',title: '鍒�', sort:true} - ,{field: 'lev1', align: 'center',title: '灞�', sort:true} + ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿', hide:false} + ,{field: 'row1', align: 'center',title: '鎺�', sort:true, hide:false} + ,{field: 'bay1', align: 'center',title: '鍒�', sort:true, hide:false} + ,{field: 'lev1', align: 'center',title: '灞�', sort:true, hide:false} ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){ var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' disabled table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.fullPlt === 'Y'){html += " checked ";} html += ">"; return html; - },width:80} + },width:80, hide:false} // ,{field: 'outEnable', align: 'center',title: ''} - // ,{field: 'ioTime$', align: 'center',title: ''} - // ,{field: 'firstTime$', align: 'center',title: ''} + ,{field: 'ioTime$', align: 'center',title: 'ioTime', hide:true} + // ,{field: 'firstTime$', align: 'center',title: '', hide:true} ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true} ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true} - // ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'text-decoration: underline;cursor:pointer'} - // ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿'} + ,{field: 'appeUser$', align: 'center',title: '鍒涘缓鑰�',event: 'appeUser', style: 'text-decoration: underline;cursor:pointer', hide:true} + ,{field: 'appeTime$', align: 'center',title: '娣诲姞鏃堕棿', hide:true} // ,{field: 'errorTime$', align: 'center',title: ''} // ,{field: 'errorMemo', align: 'center',title: ''} // ,{field: 'ctnKind', align: 'center',title: ''} @@ -54,9 +54,9 @@ // ,{field: 'barcode', align: 'center',title: ''} // ,{field: 'PdcType', align: 'center',title: ''} // ,{field: 'ctnNo', align: 'center',title: ''} - ,{field: 'locType1$', align: 'center',title: '澶у皬绫诲瀷'} - // ,{field: 'locType2$', align: 'center',title: '瀹界獎绫诲瀷'} - // ,{field: 'locType3$', align: 'center',title: '杞婚噸绫诲瀷'} + ,{field: 'locType1$', align: 'center',title: '楂樹綆绫诲瀷', hide:true} + ,{field: 'locType2$', align: 'center',title: '瀹界獎绫诲瀷', hide:true} + ,{field: 'locType3$', align: 'center',title: '杞婚噸绫诲瀷', hide:true} ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:100} ]], diff --git a/src/main/webapp/static/js/stoMan/stoQue.js b/src/main/webapp/static/js/stoMan/stoQue.js index 14ad105..0e3a266 100644 --- a/src/main/webapp/static/js/stoMan/stoQue.js +++ b/src/main/webapp/static/js/stoMan/stoQue.js @@ -26,23 +26,25 @@ cellMinWidth: 50, cols: [[ {type: 'checkbox'} - ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�'} - ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��', width: 180, style: 'color: #8E2323'} - // ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷'} - ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿'} - ,{field: 'row1', align: 'center',title: '鎺�'} - ,{field: 'bay1', align: 'center',title: '鍒�'} - ,{field: 'lev1', align: 'center',title: '灞�'} + ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', hide:false} + ,{field: 'locSts$', align: 'center',title: '搴撲綅鐘舵��', width: 180, style: 'color: #8E2323', hide:false} + ,{field: 'whsType$', align: 'center',title: '搴撲綅绫诲瀷', width: 180, style: 'color: #8E2323', hide:false} + ,{field: 'crnNo', align: 'center',title: '鍫嗗灈鏈哄彿', sort:true, hide:false} + ,{field: 'row1', align: 'center',title: '鎺�', sort:true, hide:true} + ,{field: 'bay1', align: 'center',title: '鍒�', sort:true, hide:true} + ,{field: 'lev1', align: 'center',title: '灞�', sort:true, hide:true} ,{field: 'fullPlt', align: 'center',title: '婊℃澘', templet:function(row){ var html = "<input value='fullPlt' type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.fullPlt === 'Y'){html += " checked ";} html += "disabled='disabled' >"; return html; },width:80} - ,{field: 'barcode', align: 'center',title: '鏉$爜鍙�'} - ,{field: 'locType1$', align: 'center',title: '澶у皬绫诲瀷'} - ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳'} - ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', width: 180} + ,{field: 'barcode', align: 'center',title: '鏉$爜鍙�', hide:false} + ,{field: 'locType1$', align: 'center',title: '楂樹綆绫诲瀷', hide:true} + ,{field: 'locType2$', align: 'center',title: '瀹界獎绫诲瀷', hide:true} + ,{field: 'locType3$', align: 'center',title: '杞婚噸绫诲瀷', hide:true} + ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true} + ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', width: 180, hide:false} ,{ fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate'} ]], request: { diff --git a/src/main/webapp/views/locMast/locMast.html b/src/main/webapp/views/locMast/locMast.html index 78c5440..b4bd9fb 100644 --- a/src/main/webapp/views/locMast/locMast.html +++ b/src/main/webapp/views/locMast/locMast.html @@ -41,6 +41,17 @@ </div> </div> <div class="layui-inline"> + <div class="layui-input-inline cool-auto-complete"> + <input id="whsType" name="whs_type" class="layui-input" type="text" style="display: none"> + <input id="whsType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="搴撲綅绫诲瀷" onfocus=this.blur()> + <div class="cool-auto-complete-window"> + <input class="cool-auto-complete-window-input" data-key="basWhsQueryBywhsType" onkeyup="autoLoad2(this.getAttribute('data-key'))"> + <select class="cool-auto-complete-window-select" data-key="basWhsQueryBywhsTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> + </select> + </div> + </div> + </div> + <div class="layui-inline"> <div class="layui-input-inline"> <select name="loc_type1" id="loc_type1" class="layui-input" type="text" placeholder="搴撲綅绫诲瀷" autocomplete="off"> <!-- <option style="display: none"></option>--> @@ -86,7 +97,7 @@ <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button> <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button> <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">鍒濆鍖�</button> - <button class="layui-btn layui-btn-sm" id="btn-convertSize" lay-event="convertSize">澶у皬搴撲綅杞崲</button> +<!-- <button class="layui-btn layui-btn-sm" id="btn-convertSize" lay-event="convertSize">澶у皬搴撲綅杞崲</button>--> <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button> </div> </script> diff --git a/src/main/webapp/views/locMast/locMast_detail.html b/src/main/webapp/views/locMast/locMast_detail.html index 1e12d40..7331715 100644 --- a/src/main/webapp/views/locMast/locMast_detail.html +++ b/src/main/webapp/views/locMast/locMast_detail.html @@ -35,11 +35,11 @@ <input id="locType" class="layui-input" type="text" > </div> </div> - <div class="layui-inline" style="width:80%; display: none"> - <label class="layui-form-label">搴撲綅绫诲瀷锛�</label> + <div class="layui-inline" style="width:80%"> + <label class="layui-form-label"><span class="not-null">*</span>搴撲綅绫诲瀷锛�</label> <div class="layui-input-inline cool-auto-complete"> <input id="whsType" class="layui-input" type="text" style="display: none"> - <input id="whsType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()> + <input id="whsType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur() disabled="disabled"> <div class="cool-auto-complete-window"> <input class="cool-auto-complete-window-input" data-key="basWhsQueryBywhsType" onkeyup="autoLoad(this.getAttribute('data-key'))"> <select class="cool-auto-complete-window-select" data-key="basWhsQueryBywhsTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> diff --git a/src/main/webapp/views/stoMan/stoQue.html b/src/main/webapp/views/stoMan/stoQue.html index ffc3e82..e3d4d55 100644 --- a/src/main/webapp/views/stoMan/stoQue.html +++ b/src/main/webapp/views/stoMan/stoQue.html @@ -44,6 +44,17 @@ </div> </div> <div class="layui-inline"> + <div class="layui-input-inline cool-auto-complete"> + <input id="whsType" name="whs_type" class="layui-input" type="text" style="display: none"> + <input id="whsType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="搴撲綅绫诲瀷" onfocus=this.blur()> + <div class="cool-auto-complete-window"> + <input class="cool-auto-complete-window-input" data-key="basWhsQueryBywhsType" onkeyup="autoLoad2(this.getAttribute('data-key'))"> + <select class="cool-auto-complete-window-select" data-key="basWhsQueryBywhsTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> + </select> + </div> + </div> + </div> + <div class="layui-inline"> <div class="layui-input-inline"> <select name="loc_type1" id="loc_type1" class="layui-input" type="text" placeholder="搴撲綅绫诲瀷" autocomplete="off"> <!-- <option style="display: none"></option>--> -- Gitblit v1.9.1