Commit 11bd56cad70c20fcae86e62b545d6994128ea71b

Authored by mahuandong
2 parents a34afacb 14ea7786

Merge remote-tracking branch 'origin/develop' into develop

Showing 35 changed files with 321 additions and 225 deletions
src/main/java/com/huaheng/pc/config/company/controller/CompanyController.java
@@ -60,7 +60,8 @@ public class CompanyController extends BaseController { @@ -60,7 +60,8 @@ public class CompanyController extends BaseController {
60 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Company::getCreated, createdBegin) 60 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Company::getCreated, createdBegin)
61 .lt(StringUtils.isNotEmpty(createdEnd), Company::getCreated, createdEnd) 61 .lt(StringUtils.isNotEmpty(createdEnd), Company::getCreated, createdEnd)
62 .eq(StringUtils.isNotEmpty(company.getCode()), Company::getCode, company.getCode()) 62 .eq(StringUtils.isNotEmpty(company.getCode()), Company::getCode, company.getCode())
63 - .eq(StringUtils.isNotEmpty(company.getName()), Company::getName, company.getName()) 63 + .like(StringUtils.isNotEmpty(company.getName()), Company::getName, company.getName())
  64 + .eq(Company::getDeleted,false)
64 .orderByDesc(Company::getCreated); 65 .orderByDesc(Company::getCreated);
65 66
66 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ 67 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
src/main/java/com/huaheng/pc/config/company/service/CompanyServiceImpl.java
@@ -91,7 +91,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl @@ -91,7 +91,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
91 { 91 {
92 record.setCompanyId(company.getId()); 92 record.setCompanyId(company.getId());
93 record.setCompanyCode(company.getCode()); 93 record.setCompanyCode(company.getCode());
94 - record.setWarehouseId(Integer.valueOf(warehouse[i]));  
95 record.setWarehouseCode(warehouse[i+1]); 94 record.setWarehouseCode(warehouse[i+1]);
96 warehouseCompanyService.save(record); 95 warehouseCompanyService.save(record);
97 } 96 }
src/main/java/com/huaheng/pc/config/container/controller/ContainerController.java
@@ -71,7 +71,8 @@ public class ContainerController extends BaseController { @@ -71,7 +71,8 @@ public class ContainerController extends BaseController {
71 .eq(StringUtils.isNotEmpty(container.getWarehouseCode()), Container::getWarehouseCode, container.getWarehouseCode()) 71 .eq(StringUtils.isNotEmpty(container.getWarehouseCode()), Container::getWarehouseCode, container.getWarehouseCode())
72 .eq(StringUtils.isNotEmpty(container.getLocationCode()), Container::getLocationCode, container.getLocationCode()) 72 .eq(StringUtils.isNotEmpty(container.getLocationCode()), Container::getLocationCode, container.getLocationCode())
73 .eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode()) 73 .eq(Container::getWarehouseCode, ShiroUtils.getWarehouseCode())
74 - .orderByDesc(Container::getCreated); 74 + .eq(Container::getEnable,true)
  75 + .orderByDesc(Container::getId);
75 76
76 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ 77 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
77 /*使用分页查询*/ 78 /*使用分页查询*/
@@ -147,7 +148,7 @@ public class ContainerController extends BaseController { @@ -147,7 +148,7 @@ public class ContainerController extends BaseController {
147 for (Integer id : Convert.toIntArray(ids)) { 148 for (Integer id : Convert.toIntArray(ids)) {
148 Container container = containerService.getById(id); 149 Container container = containerService.getById(id);
149 if (container.getStatus().equals("empty") && StringUtils.isEmpty(container.getLocationCode())) { 150 if (container.getStatus().equals("empty") && StringUtils.isEmpty(container.getLocationCode())) {
150 - container.setDeleted(true); 151 + container.setEnable(false);
151 container.setLastUpdatedBy(ShiroUtils.getLoginName()); 152 container.setLastUpdatedBy(ShiroUtils.getLoginName());
152 containerService.updateById(container); 153 containerService.updateById(container);
153 } else { 154 } else {
src/main/java/com/huaheng/pc/config/container/domain/Container.java
@@ -106,7 +106,7 @@ public class Container implements Serializable { @@ -106,7 +106,7 @@ public class Container implements Serializable {
106 @TableField(value = "enable") 106 @TableField(value = "enable")
107 @ApiModelProperty(value="启用;0—禁用") 107 @ApiModelProperty(value="启用;0—禁用")
108 @Excel(name = "是否启用", prompt = "启用;0 禁用:1") 108 @Excel(name = "是否启用", prompt = "启用;0 禁用:1")
109 - private Integer enable; 109 + private Boolean enable;
110 110
111 /** 111 /**
112 * 打印次数 112 * 打印次数
@@ -185,10 +185,7 @@ public class Container implements Serializable { @@ -185,10 +185,7 @@ public class Container implements Serializable {
185 @ApiModelProperty(value="处理标记") 185 @ApiModelProperty(value="处理标记")
186 private String processStamp; 186 private String processStamp;
187 187
188 - @TableField(value = "deleted")  
189 - @ApiModelProperty(value = "是否删除")  
190 - @TableLogic  
191 - private Boolean deleted; 188 +
192 189
193 private static final long serialVersionUID = 1L; 190 private static final long serialVersionUID = 1L;
194 191
src/main/java/com/huaheng/pc/config/container/service/ContainerServiceImpl.java
@@ -41,8 +41,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container @@ -41,8 +41,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container
41 container.setCreatedBy(ShiroUtils.getLoginName()); 41 container.setCreatedBy(ShiroUtils.getLoginName());
42 container.setLastUpdated(null); 42 container.setLastUpdated(null);
43 container.setLastUpdatedBy(null); 43 container.setLastUpdatedBy(null);
44 - container.setEnable(0);  
45 - container.setDeleted(false); 44 + container.setEnable(true);
46 container.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0)); 45 container.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0));
47 container.setWarehouseCode(ShiroUtils.getWarehouseCode()); 46 container.setWarehouseCode(ShiroUtils.getWarehouseCode());
48 this.save(container); 47 this.save(container);
@@ -60,7 +59,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container @@ -60,7 +59,7 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container
60 Container container = containerMapper.selectOne(lambda); 59 Container container = containerMapper.selectOne(lambda);
61 60
62 //如果指定类型的最后的code存在,那么 code = 容器类型 + (排序号 + 1) 61 //如果指定类型的最后的code存在,那么 code = 容器类型 + (排序号 + 1)
63 - if (container.getCode() != null) { 62 + if (container!=null && container.getCode() != null) {
64 Integer number = Integer.valueOf(container.getCode().substring(container.getCode().length() - 5, container.getCode().length())); 63 Integer number = Integer.valueOf(container.getCode().substring(container.getCode().length() - 5, container.getCode().length()));
65 return number; 64 return number;
66 } else { 65 } else {
src/main/java/com/huaheng/pc/config/location/controller/LocationController.java
@@ -72,9 +72,10 @@ public class LocationController extends BaseController { @@ -72,9 +72,10 @@ public class LocationController extends BaseController {
72 .eq(StringUtils.isNotNull(location.getIColumn()), Location::getIColumn, location.getIColumn()) 72 .eq(StringUtils.isNotNull(location.getIColumn()), Location::getIColumn, location.getIColumn())
73 .eq(StringUtils.isNotNull(location.getIGrid()), Location::getIGrid, location.getIGrid()) 73 .eq(StringUtils.isNotNull(location.getIGrid()), Location::getIGrid, location.getIGrid())
74 .eq(StringUtils.isNotNull(location.getILayer()), Location::getILayer, location.getILayer()) 74 .eq(StringUtils.isNotNull(location.getILayer()), Location::getILayer, location.getILayer())
  75 + .eq(StringUtils.isNotEmpty(location.getStatus()),Location::getStatus,location.getStatus())
75 .eq(StringUtils.isNotEmpty(location.getLocationType()), Location::getLocationType, location.getLocationType()) 76 .eq(StringUtils.isNotEmpty(location.getLocationType()), Location::getLocationType, location.getLocationType())
76 .eq(Location::getDeleted,false) 77 .eq(Location::getDeleted,false)
77 - .orderByDesc(Location::getCreated); 78 + .orderByDesc(Location::getId);
78 79
79 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ 80 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
80 /*使用分页查询*/ 81 /*使用分页查询*/
@@ -104,8 +105,8 @@ public class LocationController extends BaseController { @@ -104,8 +105,8 @@ public class LocationController extends BaseController {
104 @PostMapping("/add") 105 @PostMapping("/add")
105 @ResponseBody 106 @ResponseBody
106 public AjaxResult addSave(Location location) { 107 public AjaxResult addSave(Location location) {
107 - Boolean result = locationService.save(location);  
108 - return toAjax(result); 108 + AjaxResult result = locationService.addsave(location);
  109 + return result;
109 } 110 }
110 111
111 112
src/main/java/com/huaheng/pc/config/location/service/LocationService.java
1 package com.huaheng.pc.config.location.service; 1 package com.huaheng.pc.config.location.service;
2 2
  3 +import com.huaheng.framework.web.domain.AjaxResult;
3 import com.huaheng.pc.config.location.domain.Location; 4 import com.huaheng.pc.config.location.domain.Location;
4 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
5 public interface LocationService extends IService<Location>{ 6 public interface LocationService extends IService<Location>{
6 7
  8 + AjaxResult addsave(Location location);
  9 +
7 boolean insertLocation(Location location); 10 boolean insertLocation(Location location);
8 11
9 void updateStatus(String locationCode, String status); 12 void updateStatus(String locationCode, String status);
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 import com.huaheng.common.exception.service.ServiceException; 6 import com.huaheng.common.exception.service.ServiceException;
7 import com.huaheng.common.utils.StringUtils; 7 import com.huaheng.common.utils.StringUtils;
8 import com.huaheng.common.utils.security.ShiroUtils; 8 import com.huaheng.common.utils.security.ShiroUtils;
  9 +import com.huaheng.framework.web.domain.AjaxResult;
9 import com.huaheng.pc.config.locationType.domain.LocationType; 10 import com.huaheng.pc.config.locationType.domain.LocationType;
10 import com.huaheng.pc.config.locationType.service.LocationTypeService; 11 import com.huaheng.pc.config.locationType.service.LocationTypeService;
11 import com.huaheng.pc.config.zone.domain.Zone; 12 import com.huaheng.pc.config.zone.domain.Zone;
@@ -33,6 +34,45 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i @@ -33,6 +34,45 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
33 @Resource 34 @Resource
34 private LocationMapper locationMapper; 35 private LocationMapper locationMapper;
35 36
  37 +
  38 + //新增库位,需要建立code,并判断是否重复
  39 + @Override
  40 + public AjaxResult addsave(Location location){
  41 +
  42 + //库区与库位类型的匹配判断
  43 + if(!location.getZoneCode().equals(location.getLocationType())){
  44 + throw new ServiceException(location.getLocationType()+"的库位类型与"+location.getZoneCode()+"库区不匹配");
  45 + }
  46 +
  47 + //创建库位编码code
  48 + String prefix = location.getLocationType().substring(1);
  49 + String code = MessageFormat.format("{0}{1}-{2}-{3}-{4}",
  50 + prefix,
  51 + String.format("%02d", location.getIRow()),
  52 + String.format("%02d", location.getIColumn()),
  53 + String.format("%02d", location.getILayer()),
  54 + String.format("%02d", location.getIGrid()));
  55 +
  56 +
  57 + //判断code是否重复
  58 + LambdaQueryWrapper<Location> lam = Wrappers.lambdaQuery();
  59 + lam.eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode())
  60 + .eq(Location::getCode,code);
  61 + if(this.getOne(lam)!=null){
  62 + return AjaxResult.error("该位置已有库位生成,请重新输入位置");
  63 + }
  64 +
  65 + //插入数据库
  66 + location.setCode(code);
  67 + location.setWarehouseCode(ShiroUtils.getWarehouseCode());
  68 + location.setCreatedBy(ShiroUtils.getLoginName());
  69 + Boolean flag=this.save(location);
  70 + if(flag == false){
  71 + return AjaxResult.error("新增库位失败,插入数据库时失败");
  72 + }
  73 + return AjaxResult.success("新增库位成功");
  74 + }
  75 +
36 @Override 76 @Override
37 public boolean insertLocation(Location location) { 77 public boolean insertLocation(Location location) {
38 /* 判断库位类型编码是否存在*/ 78 /* 判断库位类型编码是否存在*/
@@ -54,6 +94,9 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i @@ -54,6 +94,9 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
54 throw new ServiceException("库区编码不存在"); 94 throw new ServiceException("库区编码不存在");
55 } 95 }
56 96
  97 + if(!location.getZoneCode().equals(location.getLocationType())){
  98 + throw new ServiceException(location.getLocationType()+"的库位类型与"+location.getZoneCode()+"库区不匹配");
  99 + }
57 String prefix = location.getLocationType().substring(1); 100 String prefix = location.getLocationType().substring(1);
58 List<Location> locations = new ArrayList<>(); 101 List<Location> locations = new ArrayList<>();
59 for (int i=1; i<=location.getIRow().intValue(); i++) { 102 for (int i=1; i<=location.getIRow().intValue(); i++) {
@@ -78,18 +121,14 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i @@ -78,18 +121,14 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
78 String.format("%02d", j), 121 String.format("%02d", j),
79 String.format("%02d", k), 122 String.format("%02d", k),
80 String.format("%02d", m)); 123 String.format("%02d", m));
81 - QueryWrapper<Location> queryWrapper = new QueryWrapper<>();  
82 - List<Location> locationList = locationService.list(queryWrapper.eq("code", code));  
83 - if (locationList.size() != 0){  
84 - return true;  
85 - } else { 124 + LambdaQueryWrapper<Location> queryWrapper = Wrappers.lambdaQuery();
  125 + queryWrapper.eq(Location::getCode,code)
  126 + .eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode());
  127 + List<Location> locationList = locationService.list(queryWrapper);
  128 + if (locationList.size() == 0) {
86 param.setCode(code); 129 param.setCode(code);
87 - location.setWarehouseCode(ShiroUtils.getWarehouseCode());  
88 - location.setCreatedBy(ShiroUtils.getLoginName());  
89 - location.setLastUpdatedBy(ShiroUtils.getLoginName()); 130 + locations.add(param);
90 } 131 }
91 - param.setCode(code);  
92 - locations.add(param);  
93 } 132 }
94 } 133 }
95 } 134 }
src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java
@@ -17,7 +17,6 @@ public class LocationTypeServiceImpl extends ServiceImpl&lt;LocationTypeMapper, Loc @@ -17,7 +17,6 @@ public class LocationTypeServiceImpl extends ServiceImpl&lt;LocationTypeMapper, Loc
17 public List<Map<String, Object>> getLocationPrefix(){ 17 public List<Map<String, Object>> getLocationPrefix(){
18 LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); 18 LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery();
19 lambdaQueryWrapper.eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode()) 19 lambdaQueryWrapper.eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode())
20 - .eq(LocationType::getEnable, false)  
21 .eq(LocationType::getEnable, true); 20 .eq(LocationType::getEnable, true);
22 return this.listMaps(lambdaQueryWrapper); 21 return this.listMaps(lambdaQueryWrapper);
23 } 22 }
src/main/java/com/huaheng/pc/config/material/service/MaterialServiceImpl.java
@@ -144,7 +144,11 @@ public class MaterialServiceImpl extends ServiceImpl&lt;MaterialMapper, Material&gt; i @@ -144,7 +144,11 @@ public class MaterialServiceImpl extends ServiceImpl&lt;MaterialMapper, Material&gt; i
144 material.setWarehouseCode(ShiroUtils.getWarehouseCode()); 144 material.setWarehouseCode(ShiroUtils.getWarehouseCode());
145 material.setCreatedBy(ShiroUtils.getLoginName()); 145 material.setCreatedBy(ShiroUtils.getLoginName());
146 material.setLastUpdatedBy(ShiroUtils.getLoginName()); 146 material.setLastUpdatedBy(ShiroUtils.getLoginName());
147 - return null; 147 + Boolean flag=this.save(material);
  148 + if(flag==false){
  149 + return AjaxResult.error("新增物料失败,存入数据库时报错");
  150 + }
  151 + return AjaxResult.success("新增物料成功");
148 } 152 }
149 153
150 /** 154 /**
src/main/java/com/huaheng/pc/config/materialUnit/controller/MaterialUnitController.java
@@ -66,10 +66,11 @@ public class MaterialUnitController extends BaseController { @@ -66,10 +66,11 @@ public class MaterialUnitController extends BaseController {
66 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), MaterialUnit::getCreated, createdBegin) 66 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), MaterialUnit::getCreated, createdBegin)
67 .lt(StringUtils.isNotEmpty(createdEnd), MaterialUnit::getCreated, createdEnd) 67 .lt(StringUtils.isNotEmpty(createdEnd), MaterialUnit::getCreated, createdEnd)
68 .eq(StringUtils.isNotEmpty(materialUnit.getMaterialCode()), MaterialUnit::getMaterialCode, materialUnit.getMaterialCode()) 68 .eq(StringUtils.isNotEmpty(materialUnit.getMaterialCode()), MaterialUnit::getMaterialCode, materialUnit.getMaterialCode())
69 - .eq(StringUtils.isNotEmpty(materialUnit.getMaterialName()), MaterialUnit::getMaterialName, materialUnit.getMaterialName()) 69 + .like(StringUtils.isNotEmpty(materialUnit.getMaterialName()), MaterialUnit::getMaterialName, materialUnit.getMaterialName())
70 .eq(StringUtils.isNotEmpty(materialUnit.getUnit()), MaterialUnit::getUnit, materialUnit.getUnit()) 70 .eq(StringUtils.isNotEmpty(materialUnit.getUnit()), MaterialUnit::getUnit, materialUnit.getUnit())
71 .in(MaterialUnit::getCompanyCode, ShiroUtils.getCompanyCodeList()) 71 .in(MaterialUnit::getCompanyCode, ShiroUtils.getCompanyCodeList())
72 - .eq(MaterialUnit::getWarehouseCode, ShiroUtils.getWarehouseCode()); 72 + .eq(MaterialUnit::getWarehouseCode, ShiroUtils.getWarehouseCode())
  73 + .orderByDesc(MaterialUnit::getId);
73 74
74 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ 75 if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
75 /*使用分页查询*/ 76 /*使用分页查询*/
src/main/java/com/huaheng/pc/config/warehouse/controller/WareHouseController.java
@@ -67,9 +67,9 @@ public class WareHouseController extends BaseController { @@ -67,9 +67,9 @@ public class WareHouseController extends BaseController {
67 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Warehouse::getCreated, createdBegin) 67 lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Warehouse::getCreated, createdBegin)
68 .lt(StringUtils.isNotEmpty(createdEnd), Warehouse::getCreated, createdEnd) 68 .lt(StringUtils.isNotEmpty(createdEnd), Warehouse::getCreated, createdEnd)
69 .eq(StringUtils.isNotEmpty(warehouse.getCode()), Warehouse::getCode, warehouse.getCode()) 69 .eq(StringUtils.isNotEmpty(warehouse.getCode()), Warehouse::getCode, warehouse.getCode())
70 - .eq(StringUtils.isNotEmpty(warehouse.getName()), Warehouse::getName,warehouse.getName())  
71 - .orderByDesc(Warehouse::getCreated)  
72 - .eq(Warehouse::getDeleted,0); 70 + .like(StringUtils.isNotEmpty(warehouse.getName()), Warehouse::getName,warehouse.getName())
  71 + .eq(Warehouse::getDeleted,false)
  72 + .orderByDesc(Warehouse::getCreated);
73 /** 73 /**
74 * 使用分页查询 74 * 使用分页查询
75 */ 75 */
@@ -149,9 +149,10 @@ public class WareHouseController extends BaseController { @@ -149,9 +149,10 @@ public class WareHouseController extends BaseController {
149 if (count != 0) { 149 if (count != 0) {
150 return AjaxResult.error("仓库编码(" + warehouse.getCode() +")还有库存,不能删除!"); 150 return AjaxResult.error("仓库编码(" + warehouse.getCode() +")还有库存,不能删除!");
151 } 151 }
  152 + warehouse.setCode(code);
152 warehouse.setLastUpdatedBy(ShiroUtils.getLoginName()); 153 warehouse.setLastUpdatedBy(ShiroUtils.getLoginName());
153 warehouse.setDeleted(true); 154 warehouse.setDeleted(true);
154 - warehouseService.updateById(warehouse); 155 + warehouseService.saveOrUpdate(warehouse);
155 dictDataService.deleteDictDataByWarehouseCode(code); 156 dictDataService.deleteDictDataByWarehouseCode(code);
156 dictTypeService.deleteDictTypeByWarehouseCode(code); 157 dictTypeService.deleteDictTypeByWarehouseCode(code);
157 } 158 }
src/main/java/com/huaheng/pc/config/warehouseCompany/domain/WarehouseCompany.java
@@ -17,11 +17,6 @@ public class WarehouseCompany implements Serializable { @@ -17,11 +17,6 @@ public class WarehouseCompany implements Serializable {
17 @TableId(value = "id", type = IdType.AUTO) 17 @TableId(value = "id", type = IdType.AUTO)
18 private Integer id; 18 private Integer id;
19 19
20 - /**  
21 - * 仓库id  
22 - */  
23 - @TableField(value = "warehouseId")  
24 - private Integer warehouseId;  
25 20
26 /** 21 /**
27 * 仓库编码 22 * 仓库编码
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
@@ -77,7 +77,7 @@ public class CycleCountDetailController extends BaseController { @@ -77,7 +77,7 @@ public class CycleCountDetailController extends BaseController {
77 PageDomain pageDomain = TableSupport.buildPageRequest(); 77 PageDomain pageDomain = TableSupport.buildPageRequest();
78 Integer pageNum = pageDomain.getPageNum(); 78 Integer pageNum = pageDomain.getPageNum();
79 Integer pageSize = pageDomain.getPageSize(); 79 Integer pageSize = pageDomain.getPageSize();
80 - //没有主单ID传入则直接返回空list 80 + //没有主单Code传入则直接返回空list
81 if(cycleCountDetail.getCycleCountHeadCode() != null){ 81 if(cycleCountDetail.getCycleCountHeadCode() != null){
82 lambdaQueryWrapper.ge( 82 lambdaQueryWrapper.ge(
83 StringUtils.isNotEmpty(createdBegin), CycleCountDetail::getCreated, createdBegin) 83 StringUtils.isNotEmpty(createdBegin), CycleCountDetail::getCreated, createdBegin)
@@ -121,17 +121,20 @@ public class CycleCountDetailController extends BaseController { @@ -121,17 +121,20 @@ public class CycleCountDetailController extends BaseController {
121 * 新增盘点明细 121 * 新增盘点明细
122 */ 122 */
123 @GetMapping("/add") 123 @GetMapping("/add")
124 - public String add(Integer cycleCountHeadId,String companyCode, ModelMap m) 124 + public String add(String cycleCountHeadCode,String companyCode, ModelMap m)
125 { 125 {
126 - if(cycleCountHeadId == null){ 126 + if(cycleCountHeadCode == null){
127 throw new SecurityException("盘点头ID不能为空!"); 127 throw new SecurityException("盘点头ID不能为空!");
128 } 128 }
129 //相同货主才能盘点,取出盘点头的货主 129 //相同货主才能盘点,取出盘点头的货主
130 - CycleCountHeader cycleCountHeader = cycleCountHeaderService.getById(cycleCountHeadId); 130 + CycleCountHeader cycleCountHeader = new CycleCountHeader();
  131 + cycleCountHeader.setCode(cycleCountHeadCode);
  132 + cycleCountHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
  133 + LambdaQueryWrapper<CycleCountHeader> lamd = Wrappers.lambdaQuery(cycleCountHeader);
  134 + cycleCountHeader = cycleCountHeaderService.getOne(lamd);
131 companyCode = cycleCountHeader.getCompanyCode(); 135 companyCode = cycleCountHeader.getCompanyCode();
132 m.put("companyCode",companyCode); 136 m.put("companyCode",companyCode);
133 - m.put("cycleCountHeadId",cycleCountHeadId);  
134 - 137 + m.put("cycleCountHeadCode",cycleCountHeadCode);
135 return prefix + "/add"; 138 return prefix + "/add";
136 } 139 }
137 140
@@ -160,15 +163,16 @@ public class CycleCountDetailController extends BaseController { @@ -160,15 +163,16 @@ public class CycleCountDetailController extends BaseController {
160 return AjaxResult.error("删除的明细id不能为空"); 163 return AjaxResult.error("删除的明细id不能为空");
161 Integer[] detailsIds = Convert.toIntArray(ids); 164 Integer[] detailsIds = Convert.toIntArray(ids);
162 CycleCountDetail cyclecountDetail = cycleCountDetailService.getById(detailsIds[0]); 165 CycleCountDetail cyclecountDetail = cycleCountDetailService.getById(detailsIds[0]);
163 - String masterCode = cyclecountDetail.getCycleCountHeadCode();  
164 CycleCountHeader ch = new CycleCountHeader(); 166 CycleCountHeader ch = new CycleCountHeader();
165 - ch.setMasterCode(masterCode); 167 + ch.setCode(cyclecountDetail.getCycleCountHeadCode());
  168 + ch.setWarehouseCode(cyclecountDetail.getWarehouseCode());
  169 + ch.setCompanyCode(cyclecountDetail.getCompanyCode());
166 LambdaQueryWrapper<CycleCountHeader> la = Wrappers.lambdaQuery(ch); 170 LambdaQueryWrapper<CycleCountHeader> la = Wrappers.lambdaQuery(ch);
167 CycleCountHeader cyclecountHeader = cycleCountHeaderService.getOne(la); 171 CycleCountHeader cyclecountHeader = cycleCountHeaderService.getOne(la);
168 - if(cyclecountHeader==null){ 172 + if(cyclecountHeader == null){
169 return AjaxResult.error("主单据不存在"); 173 return AjaxResult.error("主单据不存在");
170 } 174 }
171 - if(cyclecountHeader.getStatusCyc() > 29){ 175 + if(cyclecountHeader.getStatusCyc() > 5){
172 return AjaxResult.error("主单据状态不允许删除"); 176 return AjaxResult.error("主单据状态不允许删除");
173 } 177 }
174 for (Integer id : detailsIds) 178 for (Integer id : detailsIds)
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
@@ -53,8 +53,11 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -53,8 +53,11 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
53 @Transactional 53 @Transactional
54 public AjaxResult addDetails(String cycleCountHeadCode, Integer[] inventoryDetailIdIds) { 54 public AjaxResult addDetails(String cycleCountHeadCode, Integer[] inventoryDetailIdIds) {
55 55
  56 + if(cycleCountHeadCode == null){
  57 + throw new ServiceException("盘点主单编码不能为空!");
  58 + }
56 CycleCountHeader cyclecountHeader =new CycleCountHeader(); 59 CycleCountHeader cyclecountHeader =new CycleCountHeader();
57 - cyclecountHeader.setMasterCode(cycleCountHeadCode); 60 + cyclecountHeader.setCode(cycleCountHeadCode);
58 LambdaQueryWrapper<CycleCountHeader> ch = Wrappers.lambdaQuery(cyclecountHeader); 61 LambdaQueryWrapper<CycleCountHeader> ch = Wrappers.lambdaQuery(cyclecountHeader);
59 cyclecountHeader = cycleCountHeaderService.getOne(ch); 62 cyclecountHeader = cycleCountHeaderService.getOne(ch);
60 //可能存在并发删除的情况 63 //可能存在并发删除的情况
@@ -68,7 +71,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -68,7 +71,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
68 CycleCountDetail cycleCountDetail = new CycleCountDetail(); 71 CycleCountDetail cycleCountDetail = new CycleCountDetail();
69 cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode()); 72 cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode());
70 cycleCountDetail.setCompanyCode(cyclecountHeader.getCompanyCode()); 73 cycleCountDetail.setCompanyCode(cyclecountHeader.getCompanyCode());
71 - cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 74 + cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getCode());
72 LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambd = Wrappers.lambdaQuery(cycleCountDetail); 75 LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambd = Wrappers.lambdaQuery(cycleCountDetail);
73 List<CycleCountDetail> cyclecountDetailList = this.list(cycleCountDetailLambd); 76 List<CycleCountDetail> cyclecountDetailList = this.list(cycleCountDetailLambd);
74 if(cyclecountDetailList == null){ 77 if(cyclecountDetailList == null){
@@ -84,7 +87,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -84,7 +87,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
84 87
85 //写入盘点明细 88 //写入盘点明细
86 CycleCountDetail ccd = new CycleCountDetail(); 89 CycleCountDetail ccd = new CycleCountDetail();
87 - ccd.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 90 + ccd.setCycleCountHeadCode(cyclecountHeader.getCode());
88 ccd.setInventoryDetailId(inventoryDetailId); 91 ccd.setInventoryDetailId(inventoryDetailId);
89 ccd.setWarehouseCode(inventoryDetail.getWarehouseCode()); 92 ccd.setWarehouseCode(inventoryDetail.getWarehouseCode());
90 ccd.setCompanyCode(inventoryDetail.getCompanyCode()); 93 ccd.setCompanyCode(inventoryDetail.getCompanyCode());
@@ -125,14 +128,14 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -125,14 +128,14 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
125 @Transactional 128 @Transactional
126 public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode) { 129 public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode) {
127 CycleCountHeader cyclecountHeader =new CycleCountHeader(); 130 CycleCountHeader cyclecountHeader =new CycleCountHeader();
128 - cyclecountHeader.setMasterCode(cycleCountHeadCode); 131 + cyclecountHeader.setCode(cycleCountHeadCode);
129 LambdaQueryWrapper<CycleCountHeader> cych = Wrappers.lambdaQuery(cyclecountHeader); 132 LambdaQueryWrapper<CycleCountHeader> cych = Wrappers.lambdaQuery(cyclecountHeader);
130 - cyclecountHeader = cycleCountHeaderService.getById(cych); 133 + cyclecountHeader = cycleCountHeaderService.getOne(cych);
131 if(cyclecountHeader == null){ 134 if(cyclecountHeader == null){
132 return AjaxResult.error("盘点单不存在"); 135 return AjaxResult.error("盘点单不存在");
133 } 136 }
134 CycleCountDetail temp = new CycleCountDetail(); 137 CycleCountDetail temp = new CycleCountDetail();
135 - temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 138 + temp.setCycleCountHeadCode(cyclecountHeader.getCode());
136 temp.setWarehouseCode(cyclecountHeader.getWarehouseCode()); 139 temp.setWarehouseCode(cyclecountHeader.getWarehouseCode());
137 temp.setCompanyCode(cyclecountHeader.getCompanyCode()); 140 temp.setCompanyCode(cyclecountHeader.getCompanyCode());
138 LambdaQueryWrapper<CycleCountDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(temp); 141 LambdaQueryWrapper<CycleCountDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(temp);
@@ -172,8 +175,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -172,8 +175,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
172 @Override 175 @Override
173 @Transactional 176 @Transactional
174 public AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId) { 177 public AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId) {
175 - /*任务主表中存在库位,在盘点明细中生成任务时,不同的库位需要生成不同的主任务*/  
176 - 178 + /*任务主表中存在库位,在盘点明细中生成任务时,不同的容器生成不同的主任务*/
  179 + //在盘点单生成任务并执行后,同一容器的物料仍然可以生成任务,否则任务已完成则无法添加任务100
  180 + //检查状态不为100的任务,在有和下发的盘点单容器相同的任务时,把该条明细的任务写入到当前相同容器的任务里
177 181
178 CycleCountDetail cycleCountDetail = this.getById(cycleCoutdetailId); 182 CycleCountDetail cycleCountDetail = this.getById(cycleCoutdetailId);
179 if(cycleCountDetail == null ){ 183 if(cycleCountDetail == null ){
@@ -190,29 +194,67 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -190,29 +194,67 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
190 if(StringUtils.isEmpty(loc.getContainerCode())){ 194 if(StringUtils.isEmpty(loc.getContainerCode())){
191 return AjaxResult.error(cycleCountDetail.getLocationCode()+"没有托盘,操作失败"); 195 return AjaxResult.error(cycleCountDetail.getLocationCode()+"没有托盘,操作失败");
192 } 196 }
  197 +
  198 + //查询任务头和明细有相同容器,没有就新增任务头和明细
  199 +
  200 + LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
  201 + taskHeaderLambdaQueryWrapper
  202 + .lt(TaskHeader::getStatus,100)
  203 + .eq(TaskHeader::getWarehouseCode,ShiroUtils.getWarehouseCode())
  204 + .eq(TaskHeader::getCompanyCode,cycleCountDetail.getCompanyCode())
  205 + .eq(TaskHeader::getInternalTaskType,700)
  206 + .eq(TaskHeader::getTaskType,700)
  207 + .eq(TaskHeader::getContainerCode,cycleCountDetail.getContainerCode());//容器
  208 + List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper);
  209 +
  210 +
193 TaskHeader task = new TaskHeader(); 211 TaskHeader task = new TaskHeader();
194 - task.setWarehouseCode(ShiroUtils.getWarehouseCode());  
195 - task.setCompanyCode(cycleCountDetail.getCompanyCode());  
196 - task.setInternalTaskType(700);  
197 - task.setTaskType(700);  
198 - task.setContainerCode(cycleCountDetail.getContainerCode());  
199 - task.setStatus(0);  
200 - task.setFromLocation(cycleCountDetail.getLocationCode());  
201 - task.setToLocation(cycleCountDetail.getLocationCode());  
202 - task.setCreated(new Date());  
203 - task.setCreatedBy(ShiroUtils.getLoginName());  
204 - task.setLastUpdatedBy(ShiroUtils.getLoginName());  
205 - task.setLastUpdated(new Date());  
206 - if(taskHeaderService.save(task)){  
207 - //锁定库位状态  
208 - locationService.updateStatus(loc.getContainerCode(),"lock"); 212 + TaskDetail taskDetail = new TaskDetail();
  213 +
  214 + if(taskHeaderList.size() <= 0){
  215 +
  216 + //存在相同容器的主任务直接加入该条主任务的明细
  217 + task.setWarehouseCode(ShiroUtils.getWarehouseCode());
  218 + task.setCompanyCode(cycleCountDetail.getCompanyCode());
  219 + task.setInternalTaskType(700);
  220 + task.setTaskType(700);
  221 + task.setContainerCode(cycleCountDetail.getContainerCode());
  222 + task.setStatus(0);
  223 + task.setFromLocation(cycleCountDetail.getLocationCode());
  224 + task.setToLocation(cycleCountDetail.getLocationCode());
  225 + task.setCreated(new Date());
  226 + task.setCreatedBy(ShiroUtils.getLoginName());
  227 + task.setLastUpdatedBy(ShiroUtils.getLoginName());
  228 + task.setLastUpdated(new Date());
  229 + if(taskHeaderService.save(task)){
  230 + //锁定库位状态
  231 + locationService.updateStatus(loc.getContainerCode(),"lock");
  232 + }else{
  233 + throw new ServiceException("盘点任务主表生成失败!");
  234 + }
  235 + //写入任务细表
  236 + taskDetail.setTaskId(task.getId());//主单ID
  237 + taskDetail.setTaskType(task.getTaskType());
  238 + taskDetail.setFromLocation(task.getFromLocation());
  239 + taskDetail.setToLocation(task.getToLocation());
  240 + taskDetail.setContainerCode(task.getContainerCode());
  241 + taskDetail.setInternalTaskType(task.getTaskType());
  242 + taskDetail.setWarehouseCode(task.getWarehouseCode());
  243 + cycleCountDetail.setTaskHeaderId(task.getId()); //盘点明细修改状态task数据源
209 }else{ 244 }else{
210 - throw new ServiceException("盘点任务主表生成失败!"); 245 +
  246 + //取其中一条主单即可
  247 + TaskHeader taskHeader = taskHeaderList.get(0);
  248 + taskDetail.setTaskId(taskHeader.getId());//主单ID
  249 + taskDetail.setTaskType(taskHeader.getTaskType());
  250 + taskDetail.setFromLocation(taskHeader.getFromLocation());
  251 + taskDetail.setToLocation(taskHeader.getToLocation());
  252 + taskDetail.setContainerCode(taskHeader.getContainerCode());
  253 + taskDetail.setInternalTaskType(taskHeader.getTaskType());
  254 + taskDetail.setWarehouseCode(taskHeader.getWarehouseCode());
  255 + cycleCountDetail.setTaskHeaderId(taskHeader.getId());//盘点明细修改状态taskHeader数据源
211 } 256 }
212 - //写入任务细表  
213 - TaskDetail taskDetail = new TaskDetail();  
214 - taskDetail.setTaskId(task.getId());//主单ID  
215 - taskDetail.setTaskType(task.getTaskType()); 257 +
216 taskDetail.setBillCode(cycleCountDetail.getCycleCountHeadCode()); 258 taskDetail.setBillCode(cycleCountDetail.getCycleCountHeadCode());
217 taskDetail.setBillDetailId(cycleCountDetail.getId()); 259 taskDetail.setBillDetailId(cycleCountDetail.getId());
218 taskDetail.setMaterialCode(cycleCountDetail.getMaterialCode()); 260 taskDetail.setMaterialCode(cycleCountDetail.getMaterialCode());
@@ -223,34 +265,31 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -223,34 +265,31 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
223 taskDetail.setFromInventoryId(cycleCountDetail.getInventoryDetailId()); 265 taskDetail.setFromInventoryId(cycleCountDetail.getInventoryDetailId());
224 taskDetail.setLot(cycleCountDetail.getLot()); 266 taskDetail.setLot(cycleCountDetail.getLot());
225 taskDetail.setProjectNo(cycleCountDetail.getProjectNo()); 267 taskDetail.setProjectNo(cycleCountDetail.getProjectNo());
226 - taskDetail.setInternalTaskType(task.getTaskType());  
227 - taskDetail.setWarehouseCode(task.getWarehouseCode());  
228 taskDetail.setCompanyCode(cycleCountDetail.getCompanyCode()); 268 taskDetail.setCompanyCode(cycleCountDetail.getCompanyCode());
229 - taskDetail.setFromLocation(task.getFromLocation());  
230 - taskDetail.setToLocation(task.getToLocation());  
231 - taskDetail.setContainerCode(task.getContainerCode());  
232 taskDetail.setCreated(new Date()); 269 taskDetail.setCreated(new Date());
233 taskDetail.setCreatedBy(ShiroUtils.getLoginName()); 270 taskDetail.setCreatedBy(ShiroUtils.getLoginName());
234 taskDetail.setLastUpdated(new Date()); 271 taskDetail.setLastUpdated(new Date());
235 taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); 272 taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
236 if(taskDetailService.save(taskDetail) == false){ 273 if(taskDetailService.save(taskDetail) == false){
237 throw new ServiceException("盘点任务明细生成失败!"); 274 throw new ServiceException("盘点任务明细生成失败!");
238 - } 275 + }
  276 +
239 //修改细单状态 277 //修改细单状态
240 cycleCountDetail.setTaskHeaderId(taskDetail.getId()); 278 cycleCountDetail.setTaskHeaderId(taskDetail.getId());
241 - cycleCountDetail.setTaskHeaderId(task.getId()); 279 + //cycleCountDetail.setTaskHeaderId(task.getId());
242 cycleCountDetail.setLastUpdated(new Date()); 280 cycleCountDetail.setLastUpdated(new Date());
243 cycleCountDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); 281 cycleCountDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
244 cycleCountDetail.setEnableStatus(5); 282 cycleCountDetail.setEnableStatus(5);
245 this.saveOrUpdate(cycleCountDetail); 283 this.saveOrUpdate(cycleCountDetail);
  284 +
246 //修改主单状态 285 //修改主单状态
247 CycleCountHeader cycleCountHeader = new CycleCountHeader(); 286 CycleCountHeader cycleCountHeader = new CycleCountHeader();
248 - cycleCountHeader.setMasterCode(cycleCountDetail.getCycleCountHeadCode()); 287 + cycleCountHeader.setCode(cycleCountDetail.getCycleCountHeadCode());
249 cycleCountHeader.setWarehouseCode(cycleCountDetail.getWarehouseCode()); 288 cycleCountHeader.setWarehouseCode(cycleCountDetail.getWarehouseCode());
250 cycleCountHeader.setCompanyCode(cycleCountDetail.getCompanyCode()); 289 cycleCountHeader.setCompanyCode(cycleCountDetail.getCompanyCode());
251 LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cycleCountHeader); 290 LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cycleCountHeader);
252 cycleCountHeader = cycleCountHeaderService.getOne(lamb); 291 cycleCountHeader = cycleCountHeaderService.getOne(lamb);
253 - cycleCountHeader.setStatusCyc(10); 292 + cycleCountHeader.setStatusCyc(5);
254 cycleCountHeaderService.saveOrUpdate(cycleCountHeader); 293 cycleCountHeaderService.saveOrUpdate(cycleCountHeader);
255 return AjaxResult.success("盘点任务生成成功"); 294 return AjaxResult.success("盘点任务生成成功");
256 } 295 }
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/controller/CycleCountHeaderController.java
@@ -78,7 +78,7 @@ public class CycleCountHeaderController extends BaseController { @@ -78,7 +78,7 @@ public class CycleCountHeaderController extends BaseController {
78 .eq(CycleCountHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库 78 .eq(CycleCountHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库
79 .eq(StringUtils.isNotEmpty(cycleCountHeader.getSourceCode()),CycleCountHeader::getSourceCode,cycleCountHeader.getSourceCode())//源盘点单号 79 .eq(StringUtils.isNotEmpty(cycleCountHeader.getSourceCode()),CycleCountHeader::getSourceCode,cycleCountHeader.getSourceCode())//源盘点单号
80 .eq(cycleCountHeader.getId() != null, CycleCountHeader::getId,cycleCountHeader.getId())//ID 80 .eq(cycleCountHeader.getId() != null, CycleCountHeader::getId,cycleCountHeader.getId())//ID
81 - .eq(StringUtils.isNotEmpty(cycleCountHeader.getMasterCode()),CycleCountHeader::getMasterCode, cycleCountHeader.getMasterCode())//盘点主表编号 81 + .eq(StringUtils.isNotEmpty(cycleCountHeader.getCode()),CycleCountHeader::getCode, cycleCountHeader.getCode())//盘点主表编号
82 .eq(cycleCountHeader.getCountOrderId() != null, CycleCountHeader::getCountOrderId, cycleCountHeader.getCountOrderId())//原始盘点ID 82 .eq(cycleCountHeader.getCountOrderId() != null, CycleCountHeader::getCountOrderId, cycleCountHeader.getCountOrderId())//原始盘点ID
83 .eq(cycleCountHeader.getStatusCyc() != null, CycleCountHeader::getStatusCyc, cycleCountHeader.getStatusCyc()) //盘点单状态 83 .eq(cycleCountHeader.getStatusCyc() != null, CycleCountHeader::getStatusCyc, cycleCountHeader.getStatusCyc()) //盘点单状态
84 .eq(cycleCountHeader.getCountType() != null ,CycleCountHeader::getCountType, cycleCountHeader.getCountType())//盘点类型 84 .eq(cycleCountHeader.getCountType() != null ,CycleCountHeader::getCountType, cycleCountHeader.getCountType())//盘点类型
@@ -119,7 +119,7 @@ public class CycleCountHeaderController extends BaseController { @@ -119,7 +119,7 @@ public class CycleCountHeaderController extends BaseController {
119 //cycleCountHeader.setRound(cycleCountHeader.getRound());//盘点轮次 119 //cycleCountHeader.setRound(cycleCountHeader.getRound());//盘点轮次
120 cycleCountHeader.setCreated(new Date()); 120 cycleCountHeader.setCreated(new Date());
121 cycleCountHeader.setCreatedBy(ShiroUtils.getLoginName()); 121 cycleCountHeader.setCreatedBy(ShiroUtils.getLoginName());
122 - cycleCountHeader.setMasterCode(cycleCountHeaderService.createCode()); 122 + cycleCountHeader.setCode(cycleCountHeaderService.createCode());
123 return toAjax(cycleCountHeaderService.save(cycleCountHeader)); 123 return toAjax(cycleCountHeaderService.save(cycleCountHeader));
124 } 124 }
125 125
@@ -171,7 +171,7 @@ public class CycleCountHeaderController extends BaseController { @@ -171,7 +171,7 @@ public class CycleCountHeaderController extends BaseController {
171 171
172 /** 172 /**
173 * 173 *
174 - * 生成差异调整单 174 + * 生成调整单
175 * */ 175 * */
176 //@RequiresPermissions("inventory:cyclecountHead:addAdjust") 176 //@RequiresPermissions("inventory:cyclecountHead:addAdjust")
177 @Log(title = "库存-盘点", operating = "新增盘点差异调整单", action = BusinessType.INSERT) 177 @Log(title = "库存-盘点", operating = "新增盘点差异调整单", action = BusinessType.INSERT)
@@ -195,7 +195,7 @@ public class CycleCountHeaderController extends BaseController { @@ -195,7 +195,7 @@ public class CycleCountHeaderController extends BaseController {
195 mmap.put("cyclecountHeader", cyclecountHeader); 195 mmap.put("cyclecountHeader", cyclecountHeader);
196 196
197 CycleCountDetail condition = new CycleCountDetail(); 197 CycleCountDetail condition = new CycleCountDetail();
198 - condition.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 198 + condition.setCycleCountHeadCode(cyclecountHeader.getCode());
199 condition.setWarehouseCode(ShiroUtils.getWarehouseCode()); 199 condition.setWarehouseCode(ShiroUtils.getWarehouseCode());
200 LambdaQueryWrapper lambda = Wrappers.lambdaQuery(condition); 200 LambdaQueryWrapper lambda = Wrappers.lambdaQuery(condition);
201 List<CycleCountDetail> details = cycleCountDetailService.list(lambda); 201 List<CycleCountDetail> details = cycleCountDetailService.list(lambda);
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/domain/CycleCountHeader.java
@@ -36,9 +36,9 @@ public class CycleCountHeader implements Serializable { @@ -36,9 +36,9 @@ public class CycleCountHeader implements Serializable {
36 /** 36 /**
37 * 盘点主表编号 37 * 盘点主表编号
38 */ 38 */
39 - @TableField(value = "masterCode") 39 + @TableField(value = "code")
40 @ApiModelProperty(value="盘点主表编号") 40 @ApiModelProperty(value="盘点主表编号")
41 - private String masterCode; 41 + private String code;
42 42
43 /** 43 /**
44 * 仓库编码 44 * 仓库编码
@@ -293,17 +293,17 @@ public class CycleCountHeader implements Serializable { @@ -293,17 +293,17 @@ public class CycleCountHeader implements Serializable {
293 * 293 *
294 * @return masterCode - 盘点主表编号 294 * @return masterCode - 盘点主表编号
295 */ 295 */
296 - public String getMasterCode() {  
297 - return masterCode; 296 + public String getCode() {
  297 + return code;
298 } 298 }
299 299
300 /** 300 /**
301 * 设置盘点主表编号 301 * 设置盘点主表编号
302 * 302 *
303 - * @param masterCode 盘点主表编号 303 + * @param code 盘点主表编号
304 */ 304 */
305 - public void setMasterCode(String masterCode) {  
306 - this.masterCode = masterCode; 305 + public void setCode(String code) {
  306 + this.code = code;
307 } 307 }
308 308
309 /** 309 /**
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
@@ -53,13 +53,13 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap @@ -53,13 +53,13 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
53 //完成时在全部单据都完成后才能修改主单状态为完成 53 //完成时在全部单据都完成后才能修改主单状态为完成
54 54
55 CycleCountHeader cyclecountHeader = new CycleCountHeader(); 55 CycleCountHeader cyclecountHeader = new CycleCountHeader();
56 - cyclecountHeader.setMasterCode(cycleCountHeaderCode); 56 + cyclecountHeader.setCode(cycleCountHeaderCode);
57 cyclecountHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); 57 cyclecountHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
58 LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cyclecountHeader); 58 LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cyclecountHeader);
59 cyclecountHeader = this.getOne(lamb); 59 cyclecountHeader = this.getOne(lamb);
60 60
61 CycleCountDetail temp = new CycleCountDetail(); 61 CycleCountDetail temp = new CycleCountDetail();
62 - temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 62 + temp.setCycleCountHeadCode(cyclecountHeader.getCode());
63 temp.setWarehouseCode(cyclecountHeader.getWarehouseCode()); 63 temp.setWarehouseCode(cyclecountHeader.getWarehouseCode());
64 temp.setCompanyCode(cyclecountHeader.getCompanyCode()); 64 temp.setCompanyCode(cyclecountHeader.getCompanyCode());
65 LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp); 65 LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp);
@@ -144,12 +144,12 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap @@ -144,12 +144,12 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
144 return AjaxResult.error("id为"+id.toString()+"的盘点单不存在出,操作中止"); 144 return AjaxResult.error("id为"+id.toString()+"的盘点单不存在出,操作中止");
145 } 145 }
146 if(cyclecountHeader.getStatusCyc() > 0){ 146 if(cyclecountHeader.getStatusCyc() > 0){
147 - return AjaxResult.error("盘点单:"+cyclecountHeader.getMasterCode()+"非新建状态,无法删除,操作中止"); 147 + return AjaxResult.error("盘点单:"+cyclecountHeader.getCode()+"非新建状态,无法删除,操作中止");
148 } 148 }
149 //批量删除子单据 149 //批量删除子单据
150 CycleCountDetail temp = new CycleCountDetail(); 150 CycleCountDetail temp = new CycleCountDetail();
151 temp.setWarehouseCode(ShiroUtils.getWarehouseCode()); 151 temp.setWarehouseCode(ShiroUtils.getWarehouseCode());
152 - temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 152 + temp.setCycleCountHeadCode(cyclecountHeader.getCode());
153 LambdaQueryWrapper lm = Wrappers.lambdaQuery(temp); 153 LambdaQueryWrapper lm = Wrappers.lambdaQuery(temp);
154 cycleCountDetailService.remove(lm); 154 cycleCountDetailService.remove(lm);
155 cycleCountHeaderMapper.deleteById(id); 155 cycleCountHeaderMapper.deleteById(id);
@@ -179,7 +179,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap @@ -179,7 +179,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
179 adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());//仓库 179 adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());//仓库
180 adjustHeader.setCode(adjustHeaderService.createCode());//生成差异单号 180 adjustHeader.setCode(adjustHeaderService.createCode());//生成差异单号
181 adjustHeader.setProblemType("盘点调整"); 181 adjustHeader.setProblemType("盘点调整");
182 - adjustHeader.setCycleCountCode(cyclecountHeader.getMasterCode()); 182 + adjustHeader.setCycleCountCode(cyclecountHeader.getCode());
183 adjustHeader.setCompanyCode(cyclecountHeader.getCompanyCode()); 183 adjustHeader.setCompanyCode(cyclecountHeader.getCompanyCode());
184 adjustHeader.setCreated(new Date()); 184 adjustHeader.setCreated(new Date());
185 adjustHeader.setCreatedBy(ShiroUtils.getLoginName()); 185 adjustHeader.setCreatedBy(ShiroUtils.getLoginName());
@@ -189,7 +189,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap @@ -189,7 +189,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
189 189
190 //根据盘点单查询明细并写入调整单 190 //根据盘点单查询明细并写入调整单
191 CycleCountDetail cycleCountDetail = new CycleCountDetail(); 191 CycleCountDetail cycleCountDetail = new CycleCountDetail();
192 - cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); 192 + cycleCountDetail.setCycleCountHeadCode(cyclecountHeader.getCode());
193 cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode()); 193 cycleCountDetail.setWarehouseCode(cyclecountHeader.getWarehouseCode());
194 LambdaQueryWrapper lam = Wrappers.lambdaQuery(cycleCountDetail); 194 LambdaQueryWrapper lam = Wrappers.lambdaQuery(cycleCountDetail);
195 List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(lam); 195 List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(lam);
@@ -206,7 +206,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap @@ -206,7 +206,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
206 adjustDetail.setCompanyCode(adjustHeader.getCompanyCode()); 206 adjustDetail.setCompanyCode(adjustHeader.getCompanyCode());
207 adjustDetail.setLocationCode(item.getLocationCode()); 207 adjustDetail.setLocationCode(item.getLocationCode());
208 adjustDetail.setContainerCode(item.getContainerCode()); 208 adjustDetail.setContainerCode(item.getContainerCode());
209 - adjustDetail.setCycleCountCode(cyclecountHeader.getMasterCode()); 209 + adjustDetail.setCycleCountCode(cyclecountHeader.getCode());
210 adjustDetail.setMaterialCode(item.getMaterialCode()); 210 adjustDetail.setMaterialCode(item.getMaterialCode());
211 adjustDetail.setMaterialName(item.getMaterialName()); 211 adjustDetail.setMaterialName(item.getMaterialName());
212 adjustDetail.setMaterialSpec(item.getMaterialSpec()); 212 adjustDetail.setMaterialSpec(item.getMaterialSpec());
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
@@ -27,7 +27,9 @@ public interface TaskHeaderService extends IService&lt;TaskHeader&gt;{ @@ -27,7 +27,9 @@ public interface TaskHeaderService extends IService&lt;TaskHeader&gt;{
27 27
28 AjaxResult createCheckOutTask(String[] ids); 28 AjaxResult createCheckOutTask(String[] ids);
29 29
30 - AjaxResult completeCycleCountOrSeeOutTask(TaskHeader taskHeader); 30 + AjaxResult completeSeeOutTask(TaskHeader taskHeader);
  31 +
  32 + AjaxResult completeCycleCountTask(TaskHeader taskHeader);
31 33
32 AjaxResult createReceiptTask(List<Integer> ids); 34 AjaxResult createReceiptTask(List<Integer> ids);
33 35
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
@@ -52,6 +52,8 @@ import java.util.Date; @@ -52,6 +52,8 @@ import java.util.Date;
52 import java.util.List; 52 import java.util.List;
53 import java.util.Map; 53 import java.util.Map;
54 import java.util.*; 54 import java.util.*;
  55 +import java.util.concurrent.CopyOnWriteArrayList;
  56 +
55 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 57 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
56 import com.huaheng.pc.task.taskHeader.domain.TaskHeader; 58 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
57 import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; 59 import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper;
@@ -419,27 +421,31 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -419,27 +421,31 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
419 @Transactional 421 @Transactional
420 public void completeTask(TaskHeader task) { 422 public void completeTask(TaskHeader task) {
421 //区分任务类型 423 //区分任务类型
422 - if (task.getInternalTaskType() == 100) { 424 + if (task.getTaskType() == 100) {
423 //入库任务 425 //入库任务
424 completeReceiptTask(task); 426 completeReceiptTask(task);
425 } 427 }
426 - if (task.getInternalTaskType() == 200) { 428 + if (task.getTaskType() == 200) {
427 // 出库任务 429 // 出库任务
428 completeShipmentTask(task); 430 completeShipmentTask(task);
429 } 431 }
430 - // 700 盘点 900 出库查看,包过空托出库查看  
431 - if (task.getInternalTaskType() == 700 || task.getInternalTaskType() == 900) {  
432 - completeCycleCountOrSeeOutTask(task); 432 + // 900 出库查看,包过空托出库查看
  433 + if ( task.getTaskType() == 900) {
  434 + completeSeeOutTask(task);
  435 + }
  436 + // 700 盘点
  437 + if ( task.getTaskType() == 700) {
  438 + completeCycleCountTask(task);
433 } 439 }
434 - if (task.getInternalTaskType() == 800) { 440 + if (task.getTaskType() == 800) {
435 // //移库 441 // //移库
436 completeTransferTask(task); 442 completeTransferTask(task);
437 } 443 }
438 - if (task.getInternalTaskType() == 500) { 444 + if (task.getTaskType() == 500) {
439 //空托盘入库 445 //空托盘入库
440 completeEmptyIn(task); 446 completeEmptyIn(task);
441 } 447 }
442 - if (task.getInternalTaskType() == 600) { 448 + if (task.getTaskType() == 600) {
443 //空托盘出库 449 //空托盘出库
444 completeEmptyOut(task); 450 completeEmptyOut(task);
445 } 451 }
@@ -863,7 +869,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -863,7 +869,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
863 TaskHeader taskHeader = new TaskHeader(); 869 TaskHeader taskHeader = new TaskHeader();
864 taskHeader.setWarehouseCode(inventoryHeader.getWarehouseCode()); 870 taskHeader.setWarehouseCode(inventoryHeader.getWarehouseCode());
865 taskHeader.setCompanyCode(inventoryHeader.getCompanyCode());//货主 871 taskHeader.setCompanyCode(inventoryHeader.getCompanyCode());//货主
866 - taskHeader.setInternalTaskType(200); 872 + taskHeader.setInternalTaskType(400);
867 taskHeader.setTaskType(900); 873 taskHeader.setTaskType(900);
868 taskHeader.setContainerCode(inventoryHeader.getContainerCode()); 874 taskHeader.setContainerCode(inventoryHeader.getContainerCode());
869 taskHeader.setStatus(1); 875 taskHeader.setStatus(1);
@@ -906,12 +912,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -906,12 +912,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
906 912
907 /** 913 /**
908 * 完成 914 * 完成
909 - * 盘点,出库查看 915 + * 出库查看
910 * 更新状态即可 916 * 更新状态即可
911 */ 917 */
912 @Transactional 918 @Transactional
913 @Override 919 @Override
914 - public AjaxResult completeCycleCountOrSeeOutTask(TaskHeader taskHeader) { 920 + public AjaxResult completeSeeOutTask(TaskHeader taskHeader) {
915 taskHeader.setStatus(100); 921 taskHeader.setStatus(100);
916 taskHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); //更新用户 922 taskHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); //更新用户
917 taskHeader.setLastUpdated(new Date()); //更新时间 923 taskHeader.setLastUpdated(new Date()); //更新时间
@@ -922,45 +928,39 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -922,45 +928,39 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
922 taskDetail.setTaskId(taskHeader.getId()); 928 taskDetail.setTaskId(taskHeader.getId());
923 LambdaQueryWrapper lambdaQueryWrapper = Wrappers.lambdaQuery(taskDetail); 929 LambdaQueryWrapper lambdaQueryWrapper = Wrappers.lambdaQuery(taskDetail);
924 List<TaskDetail> taskDetailList = taskDetailService.list(lambdaQueryWrapper);//查询子单 930 List<TaskDetail> taskDetailList = taskDetailService.list(lambdaQueryWrapper);//查询子单
925 - List<CycleCountDetail> cycleCountDetailList = new ArrayList<>();  
926 - for (TaskDetail item : taskDetailList) { 931 + List<TaskDetail> list = new CopyOnWriteArrayList<>();
  932 + for(TaskDetail item:taskDetailList){
927 item.setStatus(100); 933 item.setStatus(100);
928 item.setLastUpdatedBy(ShiroUtils.getLoginName()); //更新用户 934 item.setLastUpdatedBy(ShiroUtils.getLoginName()); //更新用户
929 item.setLastUpdated(new Date()); //更新时间 935 item.setLastUpdated(new Date()); //更新时间
930 - taskDetailList.add(item);  
931 - //盘点完成时,修改盘点详细中的状态为100,库存解锁  
932 - if (taskDetail.getTaskType() == 700) {  
933 - //盘点明细的条目由任务明细的数值取出,修改盘点明细状态,  
934 - // 并判断主单的明细是否已全部完成,然后再修改主单状态  
935 - CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(item.getBillDetailId());  
936 - cycleCountDetail.setEnableStatus(100);  
937 - cycleCountDetail.setCompletedAt(new Date());  
938 - cycleCountDetail.setCompletedBy(ShiroUtils.getLoginName());  
939 - cycleCountDetailList.add(cycleCountDetail);  
940 - //释放库位状态  
941 - locationService.updateStatus(cycleCountDetail.getLocationCode(), "empty");  
942 - //更新盘点主单状态  
943 - if(taskHeader.getTaskType() == 700){  
944 - cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode());  
945 - }  
946 - }  
947 - 936 + list.add(item);
948 } 937 }
949 - if (taskDetailService.saveOrUpdateBatch(taskDetailList) == false || taskHeaderService.saveOrUpdate(taskHeader) == false) { 938 + if (taskDetailService.saveOrUpdateBatch(list) == false || taskHeaderService.saveOrUpdate(taskHeader) == false) {
950 throw new ServiceException("任务单据状态更新失败!"); 939 throw new ServiceException("任务单据状态更新失败!");
951 } 940 }
952 - if (cycleCountDetailService.saveOrUpdateBatch(cycleCountDetailList) == false){  
953 - throw new ServiceException("盘点明细单状态更新失败!");  
954 - }  
955 -  
956 - //出库查看释放库位状态  
957 - if(taskHeader.getTaskType() == 900){  
958 - locationService.updateStatus(taskHeader.getFromLocation(), "empty");  
959 - } 941 + //释放库位状态
  942 + locationService.updateStatus(taskHeader.getFromLocation(), "empty");
960 return AjaxResult.success("完成出库查看任务"); 943 return AjaxResult.success("完成出库查看任务");
961 } 944 }
962 945
963 /** 946 /**
  947 + * 盘点完成
  948 + * @param taskHeader
  949 + * @return
  950 + */
  951 + @Transactional
  952 + @Override
  953 + public AjaxResult completeCycleCountTask(TaskHeader taskHeader){
  954 + /*盘点完成,传入任务主单,查出任务明细,通过任务明细查找盘点的明细单,完成任务同时,修改盘点细单和主单的状态*/
  955 +
  956 +
  957 +
  958 +
  959 +
  960 + return null;
  961 + }
  962 +
  963 + /**
964 * 完成空托盘入库任务 964 * 完成空托盘入库任务
965 * @param taskHeader 965 * @param taskHeader
966 */ 966 */
src/main/resources/mybatis/inventory/CycleCountHeaderMapper.xml
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <id column="id" jdbcType="INTEGER" property="id" /> 6 <id column="id" jdbcType="INTEGER" property="id" />
7 <result column="countOrderId" jdbcType="INTEGER" property="countOrderId" /> 7 <result column="countOrderId" jdbcType="INTEGER" property="countOrderId" />
8 <result column="round" jdbcType="INTEGER" property="round" /> 8 <result column="round" jdbcType="INTEGER" property="round" />
9 - <result column="masterCode" jdbcType="VARCHAR" property="masterCode" /> 9 + <result column="masterCode" jdbcType="VARCHAR" property="code" />
10 <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> 10 <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
11 <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> 11 <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
12 <result column="countType" jdbcType="VARCHAR" property="countType" /> 12 <result column="countType" jdbcType="VARCHAR" property="countType" />
@@ -36,14 +36,14 @@ @@ -36,14 +36,14 @@
36 </resultMap> 36 </resultMap>
37 <sql id="Base_Column_List"> 37 <sql id="Base_Column_List">
38 <!--@mbg.generated--> 38 <!--@mbg.generated-->
39 - id, countOrderId, round, masterCode, warehouseCode, companyCode, countType, statusCyc, 39 + id, countOrderId, round, code, warehouseCode, companyCode, countType, statusCyc,
40 countAttribute, remark, totalLocs, totalItems, zoneCode, locationFilter, releasedBy, 40 countAttribute, remark, totalLocs, totalItems, zoneCode, locationFilter, releasedBy,
41 releasedAt, closedBy, closedAt, created, createdBy, lastUpdated, lastUpdatedBy, version, 41 releasedAt, closedBy, closedAt, created, createdBy, lastUpdated, lastUpdatedBy, version,
42 userDef1, userDef2, userDef3, verifyBy, sourceCode, uploadTime, uploadStatus 42 userDef1, userDef2, userDef3, verifyBy, sourceCode, uploadTime, uploadStatus
43 </sql> 43 </sql>
44 44
45 <select id="getLastCode" resultType="java.lang.String"> 45 <select id="getLastCode" resultType="java.lang.String">
46 - SELECT masterCode FROM cycle_count_header ORDER BY id DESC LIMIT 1 46 + SELECT code FROM cycle_count_header ORDER BY id DESC LIMIT 1
47 </select> 47 </select>
48 48
49 49
src/main/resources/static/file/物料.xls deleted
1 -ÎïÁÏ code  
src/main/resources/templates/config/company/edit.html
@@ -18,14 +18,14 @@ @@ -18,14 +18,14 @@
18 <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> 18 <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
19 </div> 19 </div>
20 </div> 20 </div>
21 - <div class="form-group">  
22 - <label class="col-sm-3 control-label">仓库:</label>  
23 - <div class="col-sm-8">  
24 - <select id="warehouseCode" name="warehouseCode" class="form-control" >  
25 - <option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>  
26 - </select>  
27 - </div>  
28 - </div> 21 + <!--<div class="form-group">-->
  22 + <!--<label class="col-sm-3 control-label">仓库:</label>-->
  23 + <!--<div class="col-sm-8">-->
  24 + <!--<select id="warehouseCode" name="warehouseCode" class="form-control" >-->
  25 + <!--<option th:each="item : ${warehouseList}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['name']}"></option>-->
  26 + <!--</select>-->
  27 + <!--</div>-->
  28 + <!--</div>-->
29 <div class="form-group"> 29 <div class="form-group">
30 <label class="col-sm-3 control-label">地址1:</label> 30 <label class="col-sm-3 control-label">地址1:</label>
31 <div class="col-sm-8"> 31 <div class="col-sm-8">
src/main/resources/templates/config/container/container.html
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <li> 24 <li>
25 容器类型:<select name="containerType" th:with="containerType = ${@containerType.getCode()}"> 25 容器类型:<select name="containerType" th:with="containerType = ${@containerType.getCode()}">
26 <option value="">所有</option> 26 <option value="">所有</option>
27 - <option th:each="item : ${containerType}" th:text="${item['name']}" th:value="${item['prefix']}"></option> 27 + <option th:each="item : ${containerType}" th:text="${item['name']}" th:value="${item['code']}"></option>
28 </select> 28 </select>
29 </li> 29 </li>
30 <li class="time"> 30 <li class="time">
@@ -102,10 +102,10 @@ @@ -102,10 +102,10 @@
102 { 102 {
103 field : 'containerType', 103 field : 'containerType',
104 title : '容器类型', 104 title : '容器类型',
105 - align: 'center',  
106 - formatter: function(value, row, index) {  
107 - return $.table.selectPrefixToName(containerTypes, value);  
108 - } 105 + // align: 'center',
  106 + // formatter: function(value, row, index) {
  107 + // return $.table.selectPrefixToName(containerTypes, value);
  108 + // }
109 }, 109 },
110 { 110 {
111 field : 'locationCode', 111 field : 'locationCode',
src/main/resources/templates/config/location/add.html
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <label class="col-sm-3 control-label">库位类型:</label> 33 <label class="col-sm-3 control-label">库位类型:</label>
34 <div class="col-sm-8"> 34 <div class="col-sm-8">
35 <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> 35 <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}">
36 - <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['prefix']}"></option> 36 + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option>
37 </select> 37 </select>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -48,8 +48,8 @@ @@ -48,8 +48,8 @@
48 <div class="form-group"> 48 <div class="form-group">
49 <label class="col-sm-3 control-label">库位状态:</label> 49 <label class="col-sm-3 control-label">库位状态:</label>
50 <div class="col-sm-8"> 50 <div class="col-sm-8">
51 - <select id="status" name="status" class="form-control" th:with="statusList=${@dict.getType('locationStatus')}">  
52 - <option th:each="item : ${statusList}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> 51 + <select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}">
  52 + <option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
53 </select> 53 </select>
54 </div> 54 </div>
55 </div> 55 </div>
@@ -66,30 +66,22 @@ @@ -66,30 +66,22 @@
66 var prefix = ctx + "config/location" 66 var prefix = ctx + "config/location"
67 $("#form-location-add").validate({ 67 $("#form-location-add").validate({
68 rules:{ 68 rules:{
69 - row:{ 69 + iRow:{
70 required:true, 70 required:true,
71 digits:true 71 digits:true
72 }, 72 },
73 - line:{ 73 + iColumn:{
74 required:true, 74 required:true,
75 digits:true 75 digits:true
76 }, 76 },
77 - layer:{ 77 + iLayer:{
78 required:true, 78 required:true,
79 digits:true 79 digits:true
80 }, 80 },
81 - grid:{ 81 + iGrid:{
82 required:true, 82 required:true,
83 digits:true 83 digits:true
84 - },  
85 - rowIndex:{  
86 - required:true,  
87 - range:[1,4]  
88 - },  
89 - roadway:{  
90 - required:true,  
91 - min:0  
92 - }, 84 + }
93 }, 85 },
94 submitHandler: function(form) { 86 submitHandler: function(form) {
95 $.ajax({ 87 $.ajax({
@@ -101,9 +93,9 @@ @@ -101,9 +93,9 @@
101 "iColumn": $("input[name='iColumn']").val(), 93 "iColumn": $("input[name='iColumn']").val(),
102 "iLayer": $("input[name='iLayer']").val(), 94 "iLayer": $("input[name='iLayer']").val(),
103 "iGrid": $("input[name='iGrid']").val(), 95 "iGrid": $("input[name='iGrid']").val(),
104 - "locationType": $("#type option:selected").val(), 96 + "locationType": $("#locationType option:selected").val(),
105 "zoneCode": $("#zoneCode option:selected").attr("code"), 97 "zoneCode": $("#zoneCode option:selected").attr("code"),
106 - "enable" : $("input[name='enable']").is(':checked'), 98 + "status" : $("#status option:selected").val(),
107 }, 99 },
108 async : false, 100 async : false,
109 error : function(request) { 101 error : function(request) {
src/main/resources/templates/config/location/addBatch.html
@@ -29,12 +29,12 @@ @@ -29,12 +29,12 @@
29 <input id="iGrid" name="iGrid" class="form-control" type="text"> 29 <input id="iGrid" name="iGrid" class="form-control" type="text">
30 </div> 30 </div>
31 </div> 31 </div>
32 - <div class="form-group"> 32 + <div class="form-group">
33 <label class="col-sm-3 control-label">库位类型:</label> 33 <label class="col-sm-3 control-label">库位类型:</label>
34 <div class="col-sm-8"> 34 <div class="col-sm-8">
35 - <select id="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}">  
36 - <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option>  
37 - </select> 35 + <select id="locationType" name="locationType" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}">
  36 + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['code']}"></option>
  37 + </select>
38 </div> 38 </div>
39 </div> 39 </div>
40 <div class="form-group"> 40 <div class="form-group">
@@ -48,8 +48,8 @@ @@ -48,8 +48,8 @@
48 <div class="form-group"> 48 <div class="form-group">
49 <label class="col-sm-3 control-label">库位状态:</label> 49 <label class="col-sm-3 control-label">库位状态:</label>
50 <div class="col-sm-8"> 50 <div class="col-sm-8">
51 - <select id="status" name="status" class="form-control" th:with="statusList=${@dict.getType('locationStatus')}">  
52 - <option th:each="item : ${statusList}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> 51 + <select id="status" name="status" class="form-control" th:with="status=${@dict.getType('locationStatus')}">
  52 + <option th:each="item : ${status}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
53 </select> 53 </select>
54 </div> 54 </div>
55 </div> 55 </div>
@@ -66,22 +66,33 @@ @@ -66,22 +66,33 @@
66 var prefix = ctx + "config/location" 66 var prefix = ctx + "config/location"
67 $("#form-location-add").validate({ 67 $("#form-location-add").validate({
68 rules:{ 68 rules:{
69 - row:{ 69 + iRow:{
70 required:true, 70 required:true,
71 digits:true 71 digits:true
72 }, 72 },
73 - line:{ 73 + iColumn:{
74 required:true, 74 required:true,
75 digits:true 75 digits:true
76 }, 76 },
77 - layer:{ 77 + iLayer:{
78 required:true, 78 required:true,
79 digits:true 79 digits:true
80 }, 80 },
81 - grid:{ 81 + iGrid:{
82 required:true, 82 required:true,
83 digits:true 83 digits:true
84 - } 84 + },
  85 + zoneCode:{
  86 + required:true,
  87 + digits:true
  88 + },
  89 + locationType:{
  90 + required:true
  91 + },
  92 + // status:{
  93 + // required:true,
  94 + // digits:true
  95 + // }
85 }, 96 },
86 submitHandler: function(form) { 97 submitHandler: function(form) {
87 $.ajax({ 98 $.ajax({
@@ -95,7 +106,7 @@ @@ -95,7 +106,7 @@
95 "iGrid": $("input[name='iGrid']").val(), 106 "iGrid": $("input[name='iGrid']").val(),
96 "locationType": $("#locationType option:selected").val(), 107 "locationType": $("#locationType option:selected").val(),
97 "zoneCode": $("#zone option:selected").attr("code"), 108 "zoneCode": $("#zone option:selected").attr("code"),
98 - "enable" : $("input[name='enable']").is(':checked'), 109 + "status" : $("#status option:selected").val(),
99 }, 110 },
100 async : false, 111 async : false,
101 error : function(request) { 112 error : function(request) {
src/main/resources/templates/config/location/location.html
@@ -25,25 +25,25 @@ @@ -25,25 +25,25 @@
25 库区编码:<input type="text" name="zoneCode"/> 25 库区编码:<input type="text" name="zoneCode"/>
26 </li> 26 </li>
27 <li> 27 <li>
28 - 行:<input type="text" name="row"/> 28 + 行:<input type="text" name="iRow"/>
29 </li> 29 </li>
30 <li> 30 <li>
31 - 列:<input type="text" name="line"/> 31 + 列:<input type="text" name="iColumn"/>
32 </li> 32 </li>
33 <li> 33 <li>
34 - 层:<input type="text" name="layer"/> 34 + 层:<input type="text" name="iLayer"/>
35 </li> 35 </li>
36 <li> 36 <li>
37 - 格:<input type="text" name="grid"/>  
38 - </li>  
39 - <li>  
40 - 巷道:<input type="text" name="roadway"/> 37 + 格:<input type="text" name="iGrid"/>
41 </li> 38 </li>
42 <!--<li>--> 39 <!--<li>-->
  40 + <!--巷道:<input type="text" name="roadway"/>-->
  41 + <!--</li>-->
  42 + <!--<li>-->
43 <!--名称:<input type="text" name="name"/>--> 43 <!--名称:<input type="text" name="name"/>-->
44 <!--</li>--> 44 <!--</li>-->
45 <li> 45 <li>
46 - 库位类型:<select name="type" th:with="locationTypes = ${@locationType.getLocationPrefix()}"> 46 + 库位类型:<select name="locationType" th:with="locationTypes = ${@locationType.getLocationPrefix()}">
47 <option value="">所有</option> 47 <option value="">所有</option>
48 <option th:each="e : ${locationTypes}" th:text="${e['name']}" th:value="${e['code']}"></option> 48 <option th:each="e : ${locationTypes}" th:text="${e['name']}" th:value="${e['code']}"></option>
49 </select> 49 </select>
src/main/resources/templates/config/locationType/locationType.html
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <div class="select-list"> 10 <div class="select-list">
11 <ul> 11 <ul>
12 <li> 12 <li>
13 - 编码:<input type="text" name="code"/> 13 + 货位类型:<input type="text" name="code"/>
14 </li> 14 </li>
15 <li> 15 <li>
16 名称:<input type="text" name="name"/> 16 名称:<input type="text" name="name"/>
@@ -107,10 +107,6 @@ @@ -107,10 +107,6 @@
107 title : '校验位' 107 title : '校验位'
108 }, 108 },
109 { 109 {
110 - field : 'checkDigit',  
111 - title : '校验位'  
112 - },  
113 - {  
114 field : 'maxMaterials', 110 field : 'maxMaterials',
115 title : '最多混放物料数' 111 title : '最多混放物料数'
116 }, 112 },
src/main/resources/templates/config/material/material.html
@@ -29,9 +29,9 @@ @@ -29,9 +29,9 @@
29 </li> 29 </li>
30 <li class="time"> 30 <li class="time">
31 <label>创建时间: </label> 31 <label>创建时间: </label>
32 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 32 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
33 <span>-</span> 33 <span>-</span>
34 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 34 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
35 </li> 35 </li>
36 <li> 36 <li>
37 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 37 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
206 align: 'center', 206 align: 'center',
207 formatter: function(value, row, index) { 207 formatter: function(value, row, index) {
208 var actions = []; 208 var actions = [];
209 - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); 209 + // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
210 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); 210 actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
211 return actions.join(''); 211 return actions.join('');
212 } 212 }
src/main/resources/templates/config/warehouse/warehouse.html
@@ -213,7 +213,7 @@ @@ -213,7 +213,7 @@
213 formatter: function(value, row, index) { 213 formatter: function(value, row, index) {
214 var actions = []; 214 var actions = [];
215 actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick= edit(\''+row.code+'\')><i class="fa fa-edit"></i>编辑</a> '); 215 actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick= edit(\''+row.code+'\')><i class="fa fa-edit"></i>编辑</a> ');
216 - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(' + row.code + ')"><i class="fa fa-trash-o"></i>删除</a>'); 216 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick=removes(\''+row.code+'\')><i class="fa fa-trash-o"></i>删除</a>');
217 return actions.join(''); 217 return actions.join('');
218 } 218 }
219 }] 219 }]
@@ -225,6 +225,15 @@ @@ -225,6 +225,15 @@
225 var url = prefix + "/edit/"+code; 225 var url = prefix + "/edit/"+code;
226 $.modal.open("修改" + $.table._option.modalName, url); 226 $.modal.open("修改" + $.table._option.modalName, url);
227 } 227 }
  228 +
  229 + // 删除信息
  230 + function removes(code) {
  231 + $.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
  232 + var url = $.common.isEmpty(code) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{code}", code);
  233 + var data = { "codes": code };
  234 + $.operate.submit(url, "post", "json", data);
  235 + });
  236 + }
228 </script> 237 </script>
229 </body> 238 </body>
230 </html> 239 </html>
231 \ No newline at end of file 240 \ No newline at end of file
src/main/resources/templates/config/zoneCapacity/zoneCapacity.html
@@ -10,13 +10,10 @@ @@ -10,13 +10,10 @@
10 <div class="select-list"> 10 <div class="select-list">
11 <ul> 11 <ul>
12 <li> 12 <li>
13 - 编码:<input type="text" name="code"/> 13 + 商品编码:<input type="text" name="materialCode"/>
14 </li> 14 </li>
15 <li> 15 <li>
16 - 名称:<input type="text" name="name"/>  
17 - </li>  
18 - <li>  
19 - 存货编码:<input type="text" name="materialId"/> 16 + 商品名称:<input type="text" name="materialName"/>
20 </li> 17 </li>
21 </li> 18 </li>
22 <li> 19 <li>
src/main/resources/templates/inventory/cycleCountDetail/add.html
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <div class="row"> 8 <div class="row">
9 <div class="col-sm-12 select-info"> 9 <div class="col-sm-12 select-info">
10 <form id="inventory-form"> 10 <form id="inventory-form">
11 - <input type="hidden" id="cycleCountHeadId" name="cycleCountHeadId" th:value="${cycleCountHeadId}"> 11 + <input type="hidden" id="cycleCountHeadCode" name="cycleCountHeadCode" th:value="${cycleCountHeadCode}">
12 <div class="select-list"> 12 <div class="select-list">
13 <ul> 13 <ul>
14 <ul> 14 <ul>
@@ -329,16 +329,16 @@ @@ -329,16 +329,16 @@
329 rows.forEach(function (item) { 329 rows.forEach(function (item) {
330 ids.push(item.id); 330 ids.push(item.id);
331 }); 331 });
332 - addInner($('#cycleCountHeadId').val(),ids.join(',')); 332 + addInner($('#cycleCountHeadCode').val(),ids.join(','));
333 } 333 }
334 334
335 - function addInner(cycleCountHeadId,ids) { 335 + function addInner(cycleCountHeadCode,ids) {
336 $.ajax({ 336 $.ajax({
337 cache : true, 337 cache : true,
338 type : "post", 338 type : "post",
339 url : prefix_cycleDetails + "/add", 339 url : prefix_cycleDetails + "/add",
340 data:{ 340 data:{
341 - cycleCountHeadId:cycleCountHeadId, 341 + cycleCountHeadCode:cycleCountHeadCode,
342 inventoryDetailIdIds:ids 342 inventoryDetailIdIds:ids
343 }, 343 },
344 async : false, 344 async : false,
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <ul> 10 <ul>
11 <li> 11 <li>
12 <form id="cycleHeader-form"> 12 <form id="cycleHeader-form">
13 - 盘点主ID:<input type="text" id="cycleCountHeadCode" name="cycleCountHeadCode" readonly="readonly" /> 13 + 盘点主单编码:<input type="text" id="cycleCountHeadCode" name="cycleCountHeadCode" readonly="readonly" />
14 </form> 14 </form>
15 </li> 15 </li>
16 <li> 16 <li>
src/main/resources/templates/inventory/cycleCountHeader/add.html
@@ -33,9 +33,12 @@ @@ -33,9 +33,12 @@
33 <div class="form-group"> 33 <div class="form-group">
34 <label class="col-sm-3 control-label">货主:</label> 34 <label class="col-sm-3 control-label">货主:</label>
35 <div class="col-sm-8"> 35 <div class="col-sm-8">
36 - <input id="companyCode" name="companyCode" class="form-control" type="text"> 36 + <select id="companyCode" name="companyCode" class="form-control" th:with="list=${@companyService.getCode()}">
  37 + <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['code']}"></option>
  38 + </select>
37 </div> 39 </div>
38 </div> 40 </div>
  41 +
39 <div class="form-group"> 42 <div class="form-group">
40 <label class="col-sm-3 control-label">总货位数:</label> 43 <label class="col-sm-3 control-label">总货位数:</label>
41 <div class="col-sm-8"> 44 <div class="col-sm-8">
src/main/resources/templates/inventory/cycleCountHeader/cycleCountHeader.html
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 源盘点单号:<input type="text" name="sourceCode"/> 31 源盘点单号:<input type="text" name="sourceCode"/>
32 </li> 32 </li>
33 <li> 33 <li>
34 - 盘点主表编号:<input type="text" name="masterCode"/> 34 + 盘点单编码:<input type="text" name="code"/>
35 </li> 35 </li>
36 <li> 36 <li>
37 原始盘点ID:<input type="text" name="countOrderId"/> 37 原始盘点ID:<input type="text" name="countOrderId"/>
@@ -108,9 +108,13 @@ @@ -108,9 +108,13 @@
108 sortName: "created", 108 sortName: "created",
109 sortOrder: "desc", 109 sortOrder: "desc",
110 search: false, 110 search: false,
  111 +
111 // onDblClickRow: function (row) { 112 // onDblClickRow: function (row) {
112 // showDetail(row.id,row.code); 113 // showDetail(row.id,row.code);
113 // }, 114 // },
  115 + onDblClickRow:function(row){
  116 + detail(row.id,row.masterCode);
  117 + },
114 columns: [{ 118 columns: [{
115 checkbox: true 119 checkbox: true
116 }, 120 },
@@ -120,8 +124,8 @@ @@ -120,8 +124,8 @@
120 sortable: true 124 sortable: true
121 }, 125 },
122 { 126 {
123 - field: 'masterCode',  
124 - title: '盘点单号' 127 + field: 'code',
  128 + title: '盘点单编码'
125 }, 129 },
126 { 130 {
127 field: 'warehouseCode', 131 field: 'warehouseCode',
@@ -288,10 +292,10 @@ @@ -288,10 +292,10 @@
288 }); 292 });
289 }); 293 });
290 294
291 - function detail(id) { 295 + function detail(id,code) {
292 let url = ctx + "inventory/cycleCountDetail"; 296 let url = ctx + "inventory/cycleCountDetail";
293 - if (id) {  
294 - url = ctx + "inventory/cycleCountDetail?id=" + id; 297 + if (code) {
  298 + url = ctx + "inventory/cycleCountDetail?cycleCountHeadCode=" + code;
295 } 299 }
296 $("#tabDetail").children().remove(); 300 $("#tabDetail").children().remove();
297 $("#myTab li").removeClass("active"); 301 $("#myTab li").removeClass("active");