Commit afbfc5d89f7bc68252491433cbfcd2fd384c25ce

Authored by pengcheng
2 parents 24b78b3b 14a4dd7f

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

Showing 72 changed files with 2079 additions and 820 deletions
src/main/java/com/huaheng/pc/config/company/mapper/CompanyMapper.java
@@ -12,5 +12,6 @@ public interface CompanyMapper extends BaseMapper<Company> { @@ -12,5 +12,6 @@ public interface CompanyMapper extends BaseMapper<Company> {
12 12
13 List<Company> selectByWarehouseCode(Company company); 13 List<Company> selectByWarehouseCode(Company company);
14 14
  15 + List<Company> selectListEntityByEqual(Company condition);
15 16
16 } 17 }
17 \ No newline at end of file 18 \ No newline at end of file
src/main/java/com/huaheng/pc/config/company/service/CompanyService.java
@@ -18,4 +18,7 @@ public interface CompanyService extends IService&lt;Company&gt;{ @@ -18,4 +18,7 @@ public interface CompanyService extends IService&lt;Company&gt;{
18 public AjaxResult updateCompany(Company company); 18 public AjaxResult updateCompany(Company company);
19 19
20 public List<Map<String, Object>> getCode(); 20 public List<Map<String, Object>> getCode();
  21 +
  22 + List<Company> selectListEntityByEqual(Company condition);
  23 +
21 } 24 }
src/main/java/com/huaheng/pc/config/company/service/CompanyServiceImpl.java
@@ -107,4 +107,9 @@ public class CompanyServiceImpl extends ServiceImpl&lt;CompanyMapper, Company&gt; impl @@ -107,4 +107,9 @@ public class CompanyServiceImpl extends ServiceImpl&lt;CompanyMapper, Company&gt; impl
107 .eq(Company::getWarehouseCode, ShiroUtils.getWarehouseCode()); 107 .eq(Company::getWarehouseCode, ShiroUtils.getWarehouseCode());
108 return this.listMaps(lambda); 108 return this.listMaps(lambda);
109 } 109 }
  110 +
  111 + @Override
  112 + public List<Company> selectListEntityByEqual(Company condition) {
  113 + return companyMapper.selectListEntityByEqual(condition);
  114 + }
110 } 115 }
src/main/java/com/huaheng/pc/config/location/mapper/LocationMapper.java
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.config.location.domain.Location; 4 import com.huaheng.pc.config.location.domain.Location;
5 import org.apache.ibatis.annotations.Param; 5 import org.apache.ibatis.annotations.Param;
6 6
  7 +import java.util.LinkedHashMap;
  8 +import java.util.List;
  9 +
7 import java.util.List; 10 import java.util.List;
8 11
9 public interface LocationMapper extends BaseMapper<Location> { 12 public interface LocationMapper extends BaseMapper<Location> {
@@ -18,4 +21,7 @@ public interface LocationMapper extends BaseMapper&lt;Location&gt; { @@ -18,4 +21,7 @@ public interface LocationMapper extends BaseMapper&lt;Location&gt; {
18 21
19 Location getAllLocation(@Param("warehouseCode") String warehouseCode, @Param("type") String type); 22 Location getAllLocation(@Param("warehouseCode") String warehouseCode, @Param("type") String type);
20 23
  24 + //库位利用率
  25 + List<LinkedHashMap<String, Object>> getLocationProp();
  26 +
21 } 27 }
22 \ No newline at end of file 28 \ No newline at end of file
src/main/java/com/huaheng/pc/config/location/service/LocationService.java
@@ -5,6 +5,9 @@ import com.huaheng.pc.config.location.domain.Location; @@ -5,6 +5,9 @@ import com.huaheng.pc.config.location.domain.Location;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
6 import com.huaheng.pc.config.location.domain.LocationInfo; 6 import com.huaheng.pc.config.location.domain.LocationInfo;
7 7
  8 +import java.util.LinkedHashMap;
  9 +import java.util.List;
  10 +
8 public interface LocationService extends IService<Location>{ 11 public interface LocationService extends IService<Location>{
9 12
10 AjaxResult addsave(Location location); 13 AjaxResult addsave(Location location);
@@ -18,4 +21,7 @@ public interface LocationService extends IService&lt;Location&gt;{ @@ -18,4 +21,7 @@ public interface LocationService extends IService&lt;Location&gt;{
18 void updateContainerCodeAndStatus(String locationCode, String containerCode, String status); 21 void updateContainerCodeAndStatus(String locationCode, String containerCode, String status);
19 22
20 LocationInfo getAllLocation(String type); 23 LocationInfo getAllLocation(String type);
  24 +
  25 + //库位利用率
  26 + List<LinkedHashMap<String, Object>> getLocationProp();
21 } 27 }
src/main/java/com/huaheng/pc/config/location/service/LocationServiceImpl.java
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
16 import javax.annotation.Resource; 16 import javax.annotation.Resource;
17 import java.text.MessageFormat; 17 import java.text.MessageFormat;
18 import java.util.ArrayList; 18 import java.util.ArrayList;
  19 +import java.util.LinkedHashMap;
19 import java.util.List; 20 import java.util.List;
20 import java.util.Map; 21 import java.util.Map;
21 22
@@ -199,5 +200,9 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i @@ -199,5 +200,9 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
199 return null; 200 return null;
200 } 201 }
201 202
  203 + @Override
  204 + public List<LinkedHashMap<String, Object>> getLocationProp() {
  205 + return locationMapper.getLocationProp();
  206 + }
202 207
203 } 208 }
src/main/java/com/huaheng/pc/config/receiptType/service/ReceiptTypeServiceImpl.java
@@ -3,6 +3,7 @@ package com.huaheng.pc.config.receiptType.service; @@ -3,6 +3,7 @@ package com.huaheng.pc.config.receiptType.service;
3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6 +import com.huaheng.common.utils.StringUtils;
6 import com.huaheng.common.utils.security.ShiroUtils; 7 import com.huaheng.common.utils.security.ShiroUtils;
7 import com.huaheng.pc.config.address.domain.Address; 8 import com.huaheng.pc.config.address.domain.Address;
8 import com.huaheng.pc.config.receiptType.domain.ReceiptType; 9 import com.huaheng.pc.config.receiptType.domain.ReceiptType;
@@ -18,8 +19,8 @@ public class ReceiptTypeServiceImpl extends ServiceImpl&lt;ReceiptTypeMapper, Recei @@ -18,8 +19,8 @@ public class ReceiptTypeServiceImpl extends ServiceImpl&lt;ReceiptTypeMapper, Recei
18 19
19 public List<Map<String, Object>> getType(){ 20 public List<Map<String, Object>> getType(){
20 LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery(); 21 LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery();
21 - lambdaQueryWrapper.eq(ReceiptType::getWarehouseCode, ShiroUtils.getWarehouseCode())  
22 - .in(ReceiptType::getCompanyCode, ShiroUtils.getCompanyCodeList()); 22 + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(ShiroUtils.getWarehouseCode()),ReceiptType::getWarehouseCode, ShiroUtils.getWarehouseCode())
  23 + .in(StringUtils.isNotEmpty(ShiroUtils.getCompanyCodeList()),ReceiptType::getCompanyCode, ShiroUtils.getCompanyCodeList());
23 return this.listMaps(lambdaQueryWrapper); 24 return this.listMaps(lambdaQueryWrapper);
24 } 25 }
25 26
src/main/java/com/huaheng/pc/config/table/service/TableService.java 0 → 100644
  1 +package com.huaheng.pc.config.table.service;
  2 +
  3 +import org.springframework.stereotype.Service;
  4 +
  5 +/**
  6 + * Created by Enzo Cotter on 2019/11/25.
  7 + */
  8 +@Service("table")
  9 +public class TableService {
  10 +
  11 + public boolean getVisible(String value){
  12 + if ("t".equals(value)){
  13 + return true;
  14 + } else {
  15 + return false;
  16 + }
  17 + }
  18 +}
src/main/java/com/huaheng/pc/config/warehouse/mapper/WarehouseMapper.java
@@ -19,4 +19,7 @@ public interface WarehouseMapper extends BaseMapper&lt;Warehouse&gt; { @@ -19,4 +19,7 @@ public interface WarehouseMapper extends BaseMapper&lt;Warehouse&gt; {
19 19
20 int userCopy(@Param("warehouseCode") String warehouseCode, @Param("newWarehouseCode")String newWarehouseCode); 20 int userCopy(@Param("warehouseCode") String warehouseCode, @Param("newWarehouseCode")String newWarehouseCode);
21 21
  22 +
  23 + List<Warehouse> selectListEntityByEqual(Warehouse condition);
  24 +
22 } 25 }
23 \ No newline at end of file 26 \ No newline at end of file
src/main/java/com/huaheng/pc/config/warehouse/service/WarehouseService.java
@@ -19,4 +19,8 @@ public interface WarehouseService extends IService&lt;Warehouse&gt;{ @@ -19,4 +19,8 @@ public interface WarehouseService extends IService&lt;Warehouse&gt;{
19 */ 19 */
20 Boolean warehouseCopy(String warehouseCode, String newWarehouseCode); 20 Boolean warehouseCopy(String warehouseCode, String newWarehouseCode);
21 21
  22 +
  23 + List<Warehouse> selectListEntityByEqual(Warehouse condition);
  24 +
  25 +
22 } 26 }
src/main/java/com/huaheng/pc/config/warehouse/service/WarehouseServiceImpl.java
@@ -201,4 +201,9 @@ public class WarehouseServiceImpl extends ServiceImpl&lt;WarehouseMapper, Warehouse @@ -201,4 +201,9 @@ public class WarehouseServiceImpl extends ServiceImpl&lt;WarehouseMapper, Warehouse
201 } 201 }
202 return true; 202 return true;
203 } 203 }
  204 +
  205 + @Override
  206 + public List<Warehouse> selectListEntityByEqual(Warehouse condition) {
  207 + return warehouseMapper.selectListEntityByEqual(condition);
  208 + }
204 } 209 }
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/AdminInventoryController.java 0 → 100644
  1 +package com.huaheng.pc.inventory.inventoryDetail.controller;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  5 +import com.baomidou.mybatisplus.core.toolkit.StringUtils;
  6 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  7 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  8 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  9 +import com.huaheng.framework.web.controller.BaseController;
  10 +import com.huaheng.framework.web.page.TableDataInfo;
  11 +import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
  12 +import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Controller;
  15 +import org.springframework.web.bind.annotation.GetMapping;
  16 +import org.springframework.web.bind.annotation.PostMapping;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.ResponseBody;
  19 +
  20 +import java.util.List;
  21 +
  22 +/**
  23 + * 库存 信息操作处理
  24 + *
  25 + * @author ricard
  26 + * @date 2019-05-13
  27 + */
  28 +@Controller
  29 +@RequestMapping("/admin/inventory")
  30 +public class AdminInventoryController extends BaseController {
  31 +
  32 + private String prefix = "admin/inventory";
  33 +
  34 + @Autowired
  35 + private InventoryDetailService inventoryService;
  36 +
  37 +// @RequiresPermissions("admin:inventory:view")
  38 + @GetMapping()
  39 + public String inventory()
  40 + {
  41 + return prefix + "/inventory";
  42 + }
  43 +
  44 + /**
  45 + * 查询库存列表
  46 + */
  47 +// @RequiresPermissions("admin:inventory:list")
  48 + @Log(title = "库存-库存查看",operating = "查看库存列表", action = BusinessType.GRANT)
  49 + @PostMapping("/list")
  50 + @ResponseBody
  51 + public TableDataInfo list(InventoryDetail inventoryDetail)
  52 + {
  53 + LambdaQueryWrapper<InventoryDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  54 + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(inventoryDetail.getWarehouseCode()),InventoryDetail::getWarehouseCode,inventoryDetail.getWarehouseCode())
  55 + .eq(StringUtils.isNotEmpty(inventoryDetail.getCompanyCode()),InventoryDetail::getCompanyCode,inventoryDetail.getCompanyCode())
  56 + .eq(StringUtils.isNotEmpty(inventoryDetail.getLocationCode()),InventoryDetail::getLocationCode,inventoryDetail.getLocationCode())
  57 + .eq(StringUtils.isNotEmpty(inventoryDetail.getContainerCode()),InventoryDetail::getContainerCode,inventoryDetail.getContainerCode())
  58 + .eq(StringUtils.isNotEmpty(inventoryDetail.getMaterialCode()),InventoryDetail::getMaterialCode,inventoryDetail.getMaterialCode())
  59 + .eq(StringUtils.isNotEmpty(inventoryDetail.getInventorySts()),InventoryDetail::getInventorySts,inventoryDetail.getInventorySts())
  60 + .eq(StringUtils.isNotEmpty(inventoryDetail.getSupplierCode()),InventoryDetail::getSupplierCode,inventoryDetail.getSupplierCode());
  61 + startPage();
  62 + List<InventoryDetail> list =inventoryService.list(lambdaQueryWrapper);
  63 + return getDataTable(list);
  64 + }
  65 +}
src/main/java/com/huaheng/pc/inventory/inventoryDetail/mapper/InventoryDetailMapper.java
@@ -2,8 +2,10 @@ package com.huaheng.pc.inventory.inventoryDetail.mapper; @@ -2,8 +2,10 @@ package com.huaheng.pc.inventory.inventoryDetail.mapper;
2 2
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; 4 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
  5 +import org.apache.ibatis.annotations.Param;
5 6
6 import java.math.BigDecimal; 7 import java.math.BigDecimal;
  8 +import java.util.LinkedHashMap;
7 import java.util.List; 9 import java.util.List;
8 10
9 public interface InventoryDetailMapper extends BaseMapper<InventoryDetail> { 11 public interface InventoryDetailMapper extends BaseMapper<InventoryDetail> {
@@ -12,4 +14,21 @@ public interface InventoryDetailMapper extends BaseMapper&lt;InventoryDetail&gt; { @@ -12,4 +14,21 @@ public interface InventoryDetailMapper extends BaseMapper&lt;InventoryDetail&gt; {
12 14
13 BigDecimal getSumQty(InventoryDetail inventoryDetail); 15 BigDecimal getSumQty(InventoryDetail inventoryDetail);
14 16
  17 + //仓库维度显示库龄
  18 + String getWarehouseInventoryStatus(@Param("warehouseCode") String warehouseCode, @Param("a")Integer a, @Param("b")Integer b);
  19 +
  20 + //仓库维度显示库龄
  21 + String getWarehouseInventoryStatuss(@Param("warehouseCode") String warehouseCode,@Param("a")Integer a);
  22 +
  23 + //货主维度显示库龄
  24 + String getCompanyInventoryStatus(@Param("companyCode") String companyCode,@Param("a")Integer a,@Param("b")Integer b);
  25 +
  26 + //货主维度显示库龄
  27 + String getCompanyInventoryStatuss(@Param("companyCode") String companyCode,@Param("a")Integer a);
  28 +
  29 + //仓库维度显示库存分布
  30 + List<LinkedHashMap<String, Object>> getWarehouseInventoryProp(@Param("warehouseCode") String warehouseCode);
  31 +
  32 + //货主维度显示库存分布
  33 + List<LinkedHashMap<String, Object>> getCompanyInventoryProp(@Param("companyCode") String companyCode);
15 } 34 }
16 \ No newline at end of file 35 \ No newline at end of file
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailService.java
@@ -8,6 +8,7 @@ import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; @@ -8,6 +8,7 @@ import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
8 8
9 import java.lang.reflect.InvocationTargetException; 9 import java.lang.reflect.InvocationTargetException;
10 import java.math.BigDecimal; 10 import java.math.BigDecimal;
  11 +import java.util.LinkedHashMap;
11 import java.util.List; 12 import java.util.List;
12 13
13 public interface InventoryDetailService extends IService<InventoryDetail> { 14 public interface InventoryDetailService extends IService<InventoryDetail> {
@@ -23,6 +24,22 @@ public interface InventoryDetailService extends IService&lt;InventoryDetail&gt; { @@ -23,6 +24,22 @@ public interface InventoryDetailService extends IService&lt;InventoryDetail&gt; {
23 //求一种物料的库存之和 24 //求一种物料的库存之和
24 BigDecimal getSumQty(InventoryDetail inventoryDetail); 25 BigDecimal getSumQty(InventoryDetail inventoryDetail);
25 26
  27 + //仓库维度显示库龄
  28 + String getWarehouseInventoryStatus(String warehouseCode,Integer a,Integer b);
  29 +
  30 + String getWarehouseInventoryStatuss(String warehouseCode,Integer a);
  31 +
  32 + //货主维度显示库龄
  33 + String getCompanyInventoryStatus( String companyCode,Integer a,Integer b);
  34 +
  35 + //货主维度显示库龄
  36 + String getCompanyInventoryStatuss( String companyCode,Integer a);
  37 +
  38 + //仓库维度显示库存分布
  39 + List<LinkedHashMap<String, Object>> getWarehouseInventoryProp(String warehouseCode);
  40 +
  41 + //货主维度显示库存分布
  42 + List<LinkedHashMap<String, Object>> getCompanyInventoryProp(String companyCode);
26 43
27 } 44 }
28 45
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
@@ -243,6 +243,35 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe @@ -243,6 +243,35 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe
243 return inventoryDetailMapper.getSumQty(inventoryDetail); 243 return inventoryDetailMapper.getSumQty(inventoryDetail);
244 } 244 }
245 245
  246 + @Override
  247 + public String getWarehouseInventoryStatus(String warehouseCode, Integer a, Integer b) {
  248 + return inventoryDetailMapper.getWarehouseInventoryStatus(warehouseCode,a,b);
  249 + }
  250 +
  251 + @Override
  252 + public String getWarehouseInventoryStatuss(String warehouseCode,Integer a) {
  253 + return inventoryDetailMapper.getWarehouseInventoryStatuss(warehouseCode,a);
  254 + }
  255 +
  256 + @Override
  257 + public String getCompanyInventoryStatus(String companyCode,Integer a,Integer b) {
  258 + return inventoryDetailMapper.getCompanyInventoryStatus(companyCode,a,b);
  259 + }
  260 +
  261 + @Override
  262 + public String getCompanyInventoryStatuss(String companyCode,Integer a) {
  263 + return inventoryDetailMapper.getCompanyInventoryStatuss(companyCode,a);
  264 + }
  265 +
  266 + @Override
  267 + public List<LinkedHashMap<String, Object>> getWarehouseInventoryProp(String warehouseCode) {
  268 + return inventoryDetailMapper.getWarehouseInventoryProp(warehouseCode);
  269 + }
  270 +
  271 + @Override
  272 + public List<LinkedHashMap<String, Object>> getCompanyInventoryProp(String companyCode) {
  273 + return inventoryDetailMapper.getCompanyInventoryProp(companyCode);
  274 + }
246 } 275 }
247 276
248 277
src/main/java/com/huaheng/pc/receipt/receiptDetail/controller/AdminReceiptDetailController.java 0 → 100644
  1 +package com.huaheng.pc.receipt.receiptDetail.controller;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  8 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  9 +import com.huaheng.framework.web.controller.BaseController;
  10 +import com.huaheng.framework.web.page.TableDataInfo;
  11 +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  12 +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Controller;
  15 +import org.springframework.ui.ModelMap;
  16 +import org.springframework.web.bind.annotation.*;
  17 +
  18 +import java.util.List;
  19 +
  20 +/**
  21 + * 入库明细 信息操作处理
  22 + *
  23 + * @author huaheng
  24 + * @date 2019-05-21
  25 + */
  26 +@Controller
  27 +@RequestMapping("/admin/receiptDetail")
  28 +public class AdminReceiptDetailController extends BaseController
  29 +{
  30 + private String prefix = "admin/receiptDetail";
  31 +
  32 + @Autowired
  33 + private ReceiptDetailService receiptDetailService;
  34 +
  35 +
  36 + @GetMapping("/{receiptId}/{receiptCode}")
  37 + public String receiptDetail(@PathVariable("receiptId") String receiptId, @PathVariable("receiptCode") String receiptCode, ModelMap mmap)
  38 + {
  39 + mmap.put("receiptId", receiptId);
  40 + mmap.put("receiptCode", receiptCode);
  41 + return prefix + "/receiptDetail";
  42 + }
  43 +
  44 + /**
  45 + * 查询入库明细列表
  46 + */
  47 + @Log(title = "入库-入库单", operating = "查看入库单明细", action = BusinessType.GRANT)
  48 + @PostMapping("/list")
  49 + @ResponseBody
  50 + public TableDataInfo list(ReceiptDetail receiptDetail)
  51 + {
  52 + startPage();
  53 + LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  54 + lambdaQueryWrapper.eq(StringUtils.isNotNull(receiptDetail.getReceiptId()), ReceiptDetail::getReceiptId, receiptDetail.getReceiptId());
  55 + List<ReceiptDetail> list = receiptDetailService.list(lambdaQueryWrapper) ;
  56 + return getDataTable(list);
  57 + }
  58 +
  59 +}
src/main/java/com/huaheng/pc/receipt/receiptDetail/mapper/ReceiptDetailMapper.java
@@ -2,6 +2,18 @@ package com.huaheng.pc.receipt.receiptDetail.mapper; @@ -2,6 +2,18 @@ package com.huaheng.pc.receipt.receiptDetail.mapper;
2 2
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; 4 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  5 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  6 +
  7 +import java.util.List;
5 8
6 public interface ReceiptDetailMapper extends BaseMapper<ReceiptDetail> { 9 public interface ReceiptDetailMapper extends BaseMapper<ReceiptDetail> {
  10 +
  11 + //获取7天内的入库量
  12 + List<TaskDetail> getReceiptQtyLast7Days();
  13 +
  14 + //以仓库维度获取入库量
  15 + List<TaskDetail> getWarehouseReceipt();
  16 +
  17 + //以货主维度获取入库量
  18 + List<TaskDetail> getCompanyReceipt();
7 } 19 }
8 \ No newline at end of file 20 \ No newline at end of file
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailService.java
@@ -3,6 +3,10 @@ package com.huaheng.pc.receipt.receiptDetail.service; @@ -3,6 +3,10 @@ package com.huaheng.pc.receipt.receiptDetail.service;
3 import com.huaheng.framework.web.domain.AjaxResult; 3 import com.huaheng.framework.web.domain.AjaxResult;
4 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; 4 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
  6 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  7 +
  8 +import java.util.List;
  9 +
6 public interface ReceiptDetailService extends IService<ReceiptDetail>{ 10 public interface ReceiptDetailService extends IService<ReceiptDetail>{
7 11
8 AjaxResult saveReceiptDetaial(ReceiptDetail receiptDetail); 12 AjaxResult saveReceiptDetaial(ReceiptDetail receiptDetail);
@@ -25,4 +29,13 @@ public interface ReceiptDetailService extends IService&lt;ReceiptDetail&gt;{ @@ -25,4 +29,13 @@ public interface ReceiptDetailService extends IService&lt;ReceiptDetail&gt;{
25 void updateReceiptHeaderLastStatus(Integer id); 29 void updateReceiptHeaderLastStatus(Integer id);
26 30
27 AjaxResult approval(String ids, Integer approval); 31 AjaxResult approval(String ids, Integer approval);
  32 +
  33 + //获取7天内的入库量
  34 + List<TaskDetail> getReceiptQtyLast7Days();
  35 +
  36 + //以仓库维度获取入库量
  37 + List<TaskDetail> getWarehouseReceipt();
  38 +
  39 + //以货主维度获取入库量
  40 + List<TaskDetail> getCompanyReceipt();
28 } 41 }
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
@@ -27,6 +27,7 @@ import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; @@ -27,6 +27,7 @@ import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
27 import com.huaheng.pc.system.config.domain.Config; 27 import com.huaheng.pc.system.config.domain.Config;
28 import com.huaheng.pc.system.dict.domain.DictData; 28 import com.huaheng.pc.system.dict.domain.DictData;
29 import com.huaheng.pc.system.dict.service.IDictDataService; 29 import com.huaheng.pc.system.dict.service.IDictDataService;
  30 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
30 import io.swagger.models.auth.In; 31 import io.swagger.models.auth.In;
31 import org.aspectj.weaver.loadtime.Aj; 32 import org.aspectj.weaver.loadtime.Aj;
32 import org.springframework.stereotype.Service; 33 import org.springframework.stereotype.Service;
@@ -59,6 +60,8 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R @@ -59,6 +60,8 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
59 private CheckHeaderService checkHeaderService; 60 private CheckHeaderService checkHeaderService;
60 @Resource 61 @Resource
61 private ConfigValueService configValueService; 62 private ConfigValueService configValueService;
  63 + @Resource
  64 + private ReceiptDetailMapper receiptDetailMapper;
62 65
63 /** 66 /**
64 * 新增入库明细 67 * 新增入库明细
@@ -368,6 +371,21 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R @@ -368,6 +371,21 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
368 return AjaxResult.success("审核完成"); 371 return AjaxResult.success("审核完成");
369 } 372 }
370 373
  374 + @Override
  375 + public List<TaskDetail> getReceiptQtyLast7Days() {
  376 + return receiptDetailMapper.getReceiptQtyLast7Days();
  377 + }
  378 +
  379 + @Override
  380 + public List<TaskDetail> getWarehouseReceipt() {
  381 + return receiptDetailMapper.getWarehouseReceipt();
  382 + }
  383 +
  384 + @Override
  385 + public List<TaskDetail> getCompanyReceipt() {
  386 + return receiptDetailMapper.getCompanyReceipt();
  387 + }
  388 +
371 /** 389 /**
372 * 判断明细中是否质检 390 * 判断明细中是否质检
373 */ 391 */
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/AdminReceiptHeaderController.java 0 → 100644
  1 +package com.huaheng.pc.receipt.receiptHeader.controller;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.common.utils.security.ShiroUtils;
  8 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  9 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  10 +import com.huaheng.framework.web.controller.BaseController;
  11 +import com.huaheng.framework.web.domain.AjaxResult;
  12 +import com.huaheng.framework.web.page.TableDataInfo;
  13 +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
  14 +import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.stereotype.Controller;
  17 +import org.springframework.web.bind.annotation.GetMapping;
  18 +import org.springframework.web.bind.annotation.PostMapping;
  19 +import org.springframework.web.bind.annotation.RequestMapping;
  20 +import org.springframework.web.bind.annotation.ResponseBody;
  21 +
  22 +import java.util.ArrayList;
  23 +import java.util.List;
  24 +
  25 +
  26 +/**
  27 + * 入库单主 信息操作处理
  28 + *
  29 + * @author huaheng
  30 + * @date 2019-05-21
  31 + */
  32 +@Controller
  33 +@RequestMapping("/admin/receiptHeader")
  34 +public class AdminReceiptHeaderController extends BaseController
  35 +{
  36 +
  37 +
  38 + private String prefix = "admin/receiptHeader";
  39 +
  40 + @Autowired
  41 + private ReceiptHeaderService receiptHeaderService;
  42 +
  43 + @GetMapping()
  44 + public String receiptHeader()
  45 + {
  46 + return prefix + "/receiptHeader";
  47 + }
  48 +
  49 + /**
  50 + * 查询入库单主列表
  51 + */
  52 + @Log(title = "入库-入库单", operating = "查看入库主单列表", action = BusinessType.GRANT)
  53 + @PostMapping("/list")
  54 + @ResponseBody
  55 + public TableDataInfo list(ReceiptHeader receiptHeader, String time)
  56 + {
  57 + startPage();
  58 + LambdaQueryWrapper<ReceiptHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  59 + lambdaQueryWrapper
  60 + .eq(StringUtils.isNotEmpty(receiptHeader.getCompanyCode()),ReceiptHeader::getCompanyCode, receiptHeader.getCompanyCode())
  61 + .eq(StringUtils.isNotEmpty(receiptHeader.getWarehouseCode()),ReceiptHeader::getWarehouseCode, receiptHeader.getWarehouseCode())
  62 + .eq(StringUtils.isNotEmpty(receiptHeader.getReceiptType()),
  63 + ReceiptHeader::getReceiptType, receiptHeader.getReceiptType())
  64 + .eq(StringUtils.isNotEmpty(receiptHeader.getCode()), ReceiptHeader::getCode, receiptHeader.getCode())
  65 + .eq(StringUtils.isNotNull(receiptHeader.getFirstStatus()),
  66 + ReceiptHeader::getFirstStatus, receiptHeader.getFirstStatus())
  67 + .eq(StringUtils.isNotNull(receiptHeader.getLastStatus()),
  68 + ReceiptHeader::getLastStatus, receiptHeader.getLastStatus())
  69 + .orderByDesc(ReceiptHeader::getCreated);
  70 + List<ReceiptHeader> list = new ArrayList<>();
  71 + if(StringUtils.isEmpty(time)) {
  72 + list=receiptHeaderService.list(lambdaQueryWrapper);
  73 + }else {
  74 + list=receiptHeaderService.selectListByCreated();
  75 + }
  76 + return getDataTable(list);
  77 + }
  78 +
  79 + @PostMapping("/getReceiptHeader")
  80 + @ResponseBody
  81 + public AjaxResult<ReceiptHeader> getShipmentHeader(int id){
  82 + return AjaxResult.success(receiptHeaderService.getById(id));
  83 + }
  84 +}
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
@@ -79,9 +79,9 @@ public class ReceiptHeaderController extends BaseController { @@ -79,9 +79,9 @@ public class ReceiptHeaderController extends BaseController {
79 .eq(StringUtils.isNotEmpty(receiptHeader.getReceiptType()), 79 .eq(StringUtils.isNotEmpty(receiptHeader.getReceiptType()),
80 ReceiptHeader::getReceiptType, receiptHeader.getReceiptType()) 80 ReceiptHeader::getReceiptType, receiptHeader.getReceiptType())
81 .eq(StringUtils.isNotEmpty(receiptHeader.getCode()), ReceiptHeader::getCode, receiptHeader.getCode()) 81 .eq(StringUtils.isNotEmpty(receiptHeader.getCode()), ReceiptHeader::getCode, receiptHeader.getCode())
82 - .eq(StringUtils.isNotNull(receiptHeader.getFirstStatus()), 82 + .ge(StringUtils.isNotNull(receiptHeader.getFirstStatus()),
83 ReceiptHeader::getFirstStatus, receiptHeader.getFirstStatus()) 83 ReceiptHeader::getFirstStatus, receiptHeader.getFirstStatus())
84 - .eq(StringUtils.isNotNull(receiptHeader.getLastStatus()), 84 + .le(StringUtils.isNotNull(receiptHeader.getLastStatus()),
85 ReceiptHeader::getLastStatus, receiptHeader.getLastStatus()) 85 ReceiptHeader::getLastStatus, receiptHeader.getLastStatus())
86 .orderByDesc(ReceiptHeader::getCreated); 86 .orderByDesc(ReceiptHeader::getCreated);
87 87
@@ -195,7 +195,7 @@ public class ReceiptHeaderController extends BaseController { @@ -195,7 +195,7 @@ public class ReceiptHeaderController extends BaseController {
195 @Log(title = "入库-入库单 ",operating = "入库单删除", action = BusinessType.UPDATE) 195 @Log(title = "入库-入库单 ",operating = "入库单删除", action = BusinessType.UPDATE)
196 @PostMapping("/remove") 196 @PostMapping("/remove")
197 @ResponseBody 197 @ResponseBody
198 - public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串")Integer ids){ 198 + public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串")String ids){
199 if (StringUtils.isNull(ids)){ 199 if (StringUtils.isNull(ids)){
200 return AjaxResult.error("id为空"); 200 return AjaxResult.error("id为空");
201 } 201 }
src/main/java/com/huaheng/pc/receipt/receiptHeader/mapper/ReceiptHeaderMapper.java
@@ -3,5 +3,10 @@ package com.huaheng.pc.receipt.receiptHeader.mapper; @@ -3,5 +3,10 @@ package com.huaheng.pc.receipt.receiptHeader.mapper;
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; 4 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
5 5
  6 +import java.util.List;
  7 +
6 public interface ReceiptHeaderMapper extends BaseMapper<ReceiptHeader> { 8 public interface ReceiptHeaderMapper extends BaseMapper<ReceiptHeader> {
  9 +
  10 + List<ReceiptHeader> selectListByCreated();
  11 +
7 } 12 }
8 \ No newline at end of file 13 \ No newline at end of file
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
@@ -47,6 +47,8 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei @@ -47,6 +47,8 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
47 private CheckDetailService checkDetailService; 47 private CheckDetailService checkDetailService;
48 @Resource 48 @Resource
49 private SendMailService sendMailService; 49 private SendMailService sendMailService;
  50 + @Resource
  51 + private ReceiptHeaderMapper receiptHeaderMapper;
50 52
51 /** 53 /**
52 * 保存入库单 54 * 保存入库单
@@ -217,6 +219,7 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei @@ -217,6 +219,7 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
217 /** 219 /**
218 * 提交审核入库单 220 * 提交审核入库单
219 */ 221 */
  222 + @Transactional
220 public AjaxResult submitReview(String ids){ 223 public AjaxResult submitReview(String ids){
221 if (StringUtils.isEmpty(ids)){ 224 if (StringUtils.isEmpty(ids)){
222 return AjaxResult.error("id不能为空"); 225 return AjaxResult.error("id不能为空");
@@ -227,12 +230,16 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei @@ -227,12 +230,16 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
227 if (receiptHeader.getFirstStatus()>QuantityConstant.RECEIPT_HEADER_MODERATED ||receiptHeader.getLastStatus()>QuantityConstant.RECEIPT_HEADER_MODERATED){ 230 if (receiptHeader.getFirstStatus()>QuantityConstant.RECEIPT_HEADER_MODERATED ||receiptHeader.getLastStatus()>QuantityConstant.RECEIPT_HEADER_MODERATED){
228 return AjaxResult.error("单据号为"+receiptHeader.getCode()+"入库单不需要审核"); 231 return AjaxResult.error("单据号为"+receiptHeader.getCode()+"入库单不需要审核");
229 } 232 }
  233 + LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  234 + lambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, idArray[i]);
  235 + List<ReceiptDetail> receiptDetailList = receiptDetailService.list(lambdaQueryWrapper);
  236 + if (receiptDetailList.isEmpty()){
  237 + return AjaxResult.error("单据号为"+receiptHeader.getCode()+"入库单没有明细");
  238 + }
230 receiptHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_MODERATED); 239 receiptHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_MODERATED);
231 receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_MODERATED); 240 receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_MODERATED);
232 if (!this.updateById(receiptHeader)){ 241 if (!this.updateById(receiptHeader)){
233 throw new ServiceException("更新入库头表失败"); 242 throw new ServiceException("更新入库头表失败");
234 - } else {  
235 - return AjaxResult.success("提交审核成功,请等待审核");  
236 } 243 }
237 } 244 }
238 return AjaxResult.success("提交审核成功"); 245 return AjaxResult.success("提交审核成功");
@@ -294,4 +301,9 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei @@ -294,4 +301,9 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
294 } 301 }
295 return AjaxResult.success("加入成功"); 302 return AjaxResult.success("加入成功");
296 } 303 }
  304 +
  305 +
  306 + public List<ReceiptHeader> selectListByCreated() {
  307 + return receiptHeaderMapper.selectListByCreated();
  308 + }
297 } 309 }
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/service/ReceiptHeaderHistoryService.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 import com.huaheng.common.constant.QuantityConstant; 5 import com.huaheng.common.constant.QuantityConstant;
6 import com.huaheng.common.exception.service.ServiceException; 6 import com.huaheng.common.exception.service.ServiceException;
  7 +import com.huaheng.common.support.Convert;
7 import com.huaheng.common.utils.security.ShiroUtils; 8 import com.huaheng.common.utils.security.ShiroUtils;
8 import com.huaheng.framework.web.domain.AjaxResult; 9 import com.huaheng.framework.web.domain.AjaxResult;
9 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; 10 import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
@@ -18,6 +19,7 @@ import javax.annotation.Resource; @@ -18,6 +19,7 @@ import javax.annotation.Resource;
18 import java.lang.reflect.InvocationTargetException; 19 import java.lang.reflect.InvocationTargetException;
19 import java.util.ArrayList; 20 import java.util.ArrayList;
20 21
  22 +import java.util.Arrays;
21 import java.util.List; 23 import java.util.List;
22 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 24 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
23 import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory; 25 import com.huaheng.pc.receipt.receiptHeaderHistory.domain.ReceiptHeaderHistory;
@@ -35,51 +37,57 @@ public class ReceiptHeaderHistoryService extends ServiceImpl&lt;ReceiptHeaderHistor @@ -35,51 +37,57 @@ public class ReceiptHeaderHistoryService extends ServiceImpl&lt;ReceiptHeaderHistor
35 private ReceiptDetailHistoryService receiptDetailHistoryService; 37 private ReceiptDetailHistoryService receiptDetailHistoryService;
36 38
37 @Transactional 39 @Transactional
38 - public AjaxResult add(Integer id){  
39 - ReceiptHeader receiptHeader = receiptHeaderService.getById(id);  
40 - if (receiptHeader == null) return AjaxResult.success("");  
41 - if((receiptHeader.getFirstStatus()>= QuantityConstant.RECEIPT_HEADER_POSTING && receiptHeader.getLastStatus()>=QuantityConstant.RECEIPT_HEADER_POSTING)||  
42 - (receiptHeader.getFirstStatus()<QuantityConstant.RECEIPT_HEADER_POOL &receiptHeader.getLastStatus()<QuantityConstant.RECEIPT_HEADER_POOL)){  
43 - ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory();  
44 - List<ReceiptDetailHistory> receiptDetailHistoryList = new ArrayList<>();  
45 - //查询入库单明细  
46 - LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();  
47 - lambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id);  
48 - List<ReceiptDetail> list = receiptDetailService.list(lambdaQueryWrapper);  
49 - try {  
50 - //复制到入库历史实体  
51 - BeanUtils.copyProperties(receiptHeaderHistory, receiptHeader);  
52 - for (ReceiptDetail receiptDetail: list) {  
53 - ReceiptDetailHistory receiptDetailHistory = new ReceiptDetailHistory();  
54 - BeanUtils.copyProperties(receiptDetailHistory, receiptDetail);  
55 - receiptDetailHistoryList.add(receiptDetailHistory);  
56 - }  
57 - } catch (IllegalAccessException e) {  
58 - e.printStackTrace();  
59 - } catch (InvocationTargetException e) {  
60 - e.printStackTrace();  
61 - }  
62 -  
63 - receiptHeaderHistory.setLastUpdatedBy(ShiroUtils.getLoginName());  
64 - if (!receiptHeaderService.removeById(receiptHeader.getId())){  
65 - throw new ServiceException("删除头表失败"); 40 + public AjaxResult add(String ids){
  41 + List<Integer> idList = Arrays.asList(Convert.toIntArray(ids));
  42 + for (Integer id : idList) {
  43 + ReceiptHeader receiptHeader = receiptHeaderService.getById(id);
  44 + if (receiptHeader == null) {
  45 + return AjaxResult.success("");
66 } 46 }
67 - // 当存在明细时删除  
68 - if (list.size()!= 0){  
69 - //删除入库明细  
70 - List<Integer> ids = new ArrayList<>();  
71 - for (int i=0; i<receiptDetailHistoryList.size();i++){  
72 - receiptDetailHistoryList.get(i).setLastUpdatedBy(ShiroUtils.getLoginName());  
73 - ids.add(receiptDetailHistoryList.get(i).getId()); 47 + if((receiptHeader.getFirstStatus()>= QuantityConstant.RECEIPT_HEADER_POSTING && receiptHeader.getLastStatus()>=QuantityConstant.RECEIPT_HEADER_POSTING)||
  48 + (receiptHeader.getFirstStatus()<QuantityConstant.RECEIPT_HEADER_POOL &receiptHeader.getLastStatus()<QuantityConstant.RECEIPT_HEADER_POOL)){
  49 + ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory();
  50 + List<ReceiptDetailHistory> receiptDetailHistoryList = new ArrayList<>();
  51 + //查询入库单明细
  52 + LambdaQueryWrapper<ReceiptDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  53 + lambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id);
  54 + List<ReceiptDetail> list = receiptDetailService.list(lambdaQueryWrapper);
  55 + try {
  56 + //复制到入库历史实体
  57 + BeanUtils.copyProperties(receiptHeaderHistory, receiptHeader);
  58 + for (ReceiptDetail receiptDetail: list) {
  59 + ReceiptDetailHistory receiptDetailHistory = new ReceiptDetailHistory();
  60 + BeanUtils.copyProperties(receiptDetailHistory, receiptDetail);
  61 + receiptDetailHistoryList.add(receiptDetailHistory);
  62 + }
  63 + } catch (IllegalAccessException e) {
  64 + e.printStackTrace();
  65 + } catch (InvocationTargetException e) {
  66 + e.printStackTrace();
74 } 67 }
75 - if (!receiptDetailService.removeByIds(ids)) {  
76 - throw new ServiceException("删除明细表失败"); 68 +
  69 + receiptHeaderHistory.setLastUpdatedBy(ShiroUtils.getLoginName());
  70 + if (!receiptHeaderService.removeById(receiptHeader.getId())){
  71 + throw new ServiceException("删除头表失败");
77 } 72 }
78 - receiptDetailHistoryService.saveBatch(receiptDetailHistoryList); 73 + // 当存在明细时删除
  74 + if (list.size()!= 0){
  75 + //删除入库明细
  76 + List<Integer> receiptDetailIds = new ArrayList<>();
  77 + for (int i=0; i<receiptDetailHistoryList.size();i++){
  78 + receiptDetailHistoryList.get(i).setLastUpdatedBy(ShiroUtils.getLoginName());
  79 + receiptDetailIds.add(receiptDetailHistoryList.get(i).getId());
  80 + }
  81 + if (!receiptDetailService.removeByIds(receiptDetailIds)) {
  82 + throw new ServiceException("删除明细表失败");
  83 + }
  84 + if (!receiptDetailHistoryService.saveBatch(receiptDetailHistoryList)){
  85 + throw new ServiceException("新增明细失败");
  86 + } }
  87 + this.save(receiptHeaderHistory);
  88 + }else {
  89 + return AjaxResult.success("入库单没有完成,无法删除");
79 } 90 }
80 - this.save(receiptHeaderHistory);  
81 - }else {  
82 - return AjaxResult.success("入库单没有完成,无法删除");  
83 } 91 }
84 return AjaxResult.success("删除成功"); 92 return AjaxResult.success("删除成功");
85 } 93 }
src/main/java/com/huaheng/pc/shipment/shipmentDetail/controller/AdminShipmentDetailController.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentDetail.controller;
  2 +
  3 +
  4 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.huaheng.common.utils.StringUtils;
  7 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  8 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  9 +import com.huaheng.framework.web.controller.BaseController;
  10 +import com.huaheng.framework.web.page.TableDataInfo;
  11 +import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
  12 +import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Controller;
  15 +import org.springframework.ui.ModelMap;
  16 +import org.springframework.web.bind.annotation.*;
  17 +
  18 +import java.util.List;
  19 +
  20 +/**
  21 + * 出库明细 信息操作处理
  22 + *
  23 + * @author huaheng
  24 + * @date 2018-08-19
  25 + */
  26 +@Controller
  27 +@RequestMapping("/admin/shipmentDetail")
  28 +public class AdminShipmentDetailController extends BaseController
  29 +{
  30 + private String prefix = "admin/shipmentDetail";
  31 +
  32 + @Autowired
  33 + private ShipmentDetailService shipmentDetailService;
  34 +
  35 + @GetMapping("/{shipmentId}/{shipmentCode}")
  36 + public String shipmentDetail(@PathVariable("shipmentId") String shipmentId, @PathVariable("shipmentCode") String shipmentCode,@PathVariable("inventoryStatus") String inventoryStatus, ModelMap mmap)
  37 + {
  38 + mmap.put("receiptId", shipmentId);
  39 + mmap.put("shipmentCode", shipmentCode);
  40 + mmap.put("inventoryStatus",inventoryStatus);
  41 + return prefix + "/shipmentDetail";
  42 + }
  43 +
  44 + /**
  45 + * 查询出库明细列表
  46 + */
  47 + @Log(title = "出库-出库单", operating= "查看出库明细", action = BusinessType.GRANT)
  48 + @PostMapping("/list")
  49 + @ResponseBody
  50 + public TableDataInfo list(ShipmentDetail shipmentDetail)
  51 + {
  52 + startPage();
  53 + LambdaQueryWrapper<ShipmentDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  54 + lambdaQueryWrapper.eq(StringUtils.isNotNull(shipmentDetail.getShipmentId()), ShipmentDetail::getShipmentId, shipmentDetail.getShipmentId());
  55 + List<ShipmentDetail> list = shipmentDetailService.list(lambdaQueryWrapper) ;
  56 + return getDataTable(list);
  57 + }
  58 +
  59 +
  60 +}
src/main/java/com/huaheng/pc/shipment/shipmentDetail/mapper/ShipmentDetailMapper.java
@@ -2,6 +2,7 @@ package com.huaheng.pc.shipment.shipmentDetail.mapper; @@ -2,6 +2,7 @@ package com.huaheng.pc.shipment.shipmentDetail.mapper;
2 2
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; 4 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
  5 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
5 import org.apache.ibatis.annotations.Param; 6 import org.apache.ibatis.annotations.Param;
6 7
7 import java.util.List; 8 import java.util.List;
@@ -19,7 +20,14 @@ public interface ShipmentDetailMapper extends BaseMapper&lt;ShipmentDetail&gt; { @@ -19,7 +20,14 @@ public interface ShipmentDetailMapper extends BaseMapper&lt;ShipmentDetail&gt; {
19 20
20 Map<String,Integer> selectStatus(Integer id); 21 Map<String,Integer> selectStatus(Integer id);
21 22
  23 + //获取7天内的出库量
  24 + List<TaskDetail> getShipmentQtyLast7Days();
22 int insertDetails(@Param("shipmentDetails") List<ShipmentDetail> shipmentDetails); 25 int insertDetails(@Param("shipmentDetails") List<ShipmentDetail> shipmentDetails);
23 26
24 27
  28 + //以仓库维度获取入库量
  29 + List<TaskDetail> getWarehouseShipment();
  30 +
  31 + //以货主维度获取入库量
  32 + List<TaskDetail> getCompanyShipment();
25 } 33 }
26 \ No newline at end of file 34 \ No newline at end of file
src/main/java/com/huaheng/pc/shipment/shipmentDetail/service/ShipmentDetailService.java
@@ -3,6 +3,7 @@ package com.huaheng.pc.shipment.shipmentDetail.service; @@ -3,6 +3,7 @@ package com.huaheng.pc.shipment.shipmentDetail.service;
3 import com.huaheng.framework.web.domain.AjaxResult; 3 import com.huaheng.framework.web.domain.AjaxResult;
4 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; 4 import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
  6 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
6 7
7 import java.util.List; 8 import java.util.List;
8 import java.util.Map; 9 import java.util.Map;
@@ -26,6 +27,15 @@ public interface ShipmentDetailService extends IService&lt;ShipmentDetail&gt;{ @@ -26,6 +27,15 @@ public interface ShipmentDetailService extends IService&lt;ShipmentDetail&gt;{
26 27
27 Map<String,Integer> selectStatus(Integer id); 28 Map<String,Integer> selectStatus(Integer id);
28 29
  30 + //获取7天内的出库量
  31 + List<TaskDetail> getShipmentQtyLast7Days();
  32 +
  33 + //以仓库维度获取入库量
  34 + List<TaskDetail> getWarehouseShipment();
  35 +
  36 + //以货主维度获取入库量
  37 + List<TaskDetail> getCompanyShipment();
  38 +
29 Boolean insertDetails(List<ShipmentDetail> shipmentDetails); 39 Boolean insertDetails(List<ShipmentDetail> shipmentDetails);
30 40
31 41
src/main/java/com/huaheng/pc/shipment/shipmentDetail/service/ShipmentDetailServiceImpl.java
@@ -23,6 +23,7 @@ import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; @@ -23,6 +23,7 @@ import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
23 import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; 23 import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
24 import com.huaheng.pc.shipment.wave.domain.Wave; 24 import com.huaheng.pc.shipment.wave.domain.Wave;
25 import com.huaheng.pc.shipment.wave.service.WaveService; 25 import com.huaheng.pc.shipment.wave.service.WaveService;
  26 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
26 import org.springframework.beans.factory.annotation.Autowired; 27 import org.springframework.beans.factory.annotation.Autowired;
27 import org.springframework.stereotype.Service; 28 import org.springframework.stereotype.Service;
28 import javax.annotation.Resource; 29 import javax.annotation.Resource;
@@ -284,6 +285,21 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper, @@ -284,6 +285,21 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper,
284 } 285 }
285 286
286 @Override 287 @Override
  288 + public List<TaskDetail> getShipmentQtyLast7Days() {
  289 + return shipmentDetailMapper.getShipmentQtyLast7Days();
  290 + }
  291 +
  292 + @Override
  293 + public List<TaskDetail> getWarehouseShipment() {
  294 + return shipmentDetailMapper.getWarehouseShipment();
  295 + }
  296 +
  297 + @Override
  298 + public List<TaskDetail> getCompanyShipment() {
  299 + return shipmentDetailMapper.getCompanyShipment();
  300 + }
  301 +
  302 + @Override
287 public Boolean insertDetails(List<ShipmentDetail> shipmentDetails) { 303 public Boolean insertDetails(List<ShipmentDetail> shipmentDetails) {
288 int flag = shipmentDetailMapper.insertDetails(shipmentDetails); 304 int flag = shipmentDetailMapper.insertDetails(shipmentDetails);
289 if(flag > 0){ 305 if(flag > 0){
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/AdminShipmentHeaderController.java 0 → 100644
  1 +package com.huaheng.pc.shipment.shipmentHeader.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.utils.StringUtils;
  6 +import com.huaheng.common.utils.security.ShiroUtils;
  7 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  8 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  9 +import com.huaheng.framework.web.controller.BaseController;
  10 +import com.huaheng.framework.web.domain.AjaxResult;
  11 +import com.huaheng.framework.web.page.TableDataInfo;
  12 +import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
  13 +import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.stereotype.Controller;
  16 +import org.springframework.web.bind.annotation.GetMapping;
  17 +import org.springframework.web.bind.annotation.PostMapping;
  18 +import org.springframework.web.bind.annotation.RequestMapping;
  19 +import org.springframework.web.bind.annotation.ResponseBody;
  20 +
  21 +import java.util.ArrayList;
  22 +import java.util.List;
  23 +
  24 +
  25 +/**
  26 + * 出库单主 信息操作处理
  27 + *
  28 + * @author huaheng
  29 + * @date 2019-05-21
  30 + */
  31 +@Controller
  32 +@RequestMapping("/admin/shipmentHeader")
  33 +public class AdminShipmentHeaderController extends BaseController
  34 +{
  35 + private String prefix = "admin/shipmentHeader";
  36 +
  37 + @Autowired
  38 + private ShipmentHeaderService shipmentHeaderService;
  39 + @Autowired
  40 +
  41 +
  42 + @GetMapping()
  43 + public String shipmentHeader()
  44 + {
  45 + return prefix + "/shipmentHeader";
  46 + }
  47 +
  48 + /**
  49 + * 查询出库单主列表
  50 + */
  51 + @Log(title = "出库-出库单", operating="查看出库主单", action = BusinessType.GRANT)
  52 + @PostMapping("/list")
  53 + @ResponseBody
  54 + public TableDataInfo list(ShipmentHeader shipmentHeader, String time)
  55 + {
  56 + startPage();
  57 + LambdaQueryWrapper<ShipmentHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  58 + lambdaQueryWrapper
  59 + .eq(StringUtils.isNotEmpty(shipmentHeader.getWarehouseCode()),ShipmentHeader::getWarehouseCode, shipmentHeader.getWarehouseCode())
  60 + .eq(ShipmentHeader::getDeleted,false)
  61 + .in(StringUtils.isNotEmpty(shipmentHeader.getCompanyCode()),ShipmentHeader::getCompanyCode,shipmentHeader.getCompanyCode())
  62 + .eq(StringUtils.isNotEmpty(shipmentHeader.getCode()),ShipmentHeader::getCode,shipmentHeader.getCode())
  63 + .eq(StringUtils.isNotEmpty(shipmentHeader.getShipmentType()),ShipmentHeader::getShipmentType,shipmentHeader.getShipmentType())
  64 + .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCode()), ShipmentHeader::getReferCode, shipmentHeader.getReferCode())
  65 + .eq(StringUtils.isNotEmpty(shipmentHeader.getReferCodeType()), ShipmentHeader::getReferCodeType, shipmentHeader.getReferCodeType())
  66 + .eq(shipmentHeader.getFirstStatus()!=null, ShipmentHeader::getFirstStatus, shipmentHeader.getFirstStatus())
  67 + .eq(shipmentHeader.getLastStatus()!=null, ShipmentHeader::getLastStatus, shipmentHeader.getLastStatus())
  68 + .orderByDesc(ShipmentHeader::getId);
  69 + List<ShipmentHeader> list = new ArrayList<>();
  70 + if(StringUtils.isEmpty(time)) {
  71 + list=shipmentHeaderService.list(lambdaQueryWrapper);
  72 + }else {
  73 + list=shipmentHeaderService.selectListByCreated();
  74 + }
  75 + return getDataTable(list);
  76 + }
  77 +
  78 + @PostMapping("/getShipmentHeader")
  79 + @ResponseBody
  80 + public AjaxResult<ShipmentHeader> getShipmentHeader(int id){
  81 + return AjaxResult.success(shipmentHeaderService.getById(id));
  82 + }
  83 +}
src/main/java/com/huaheng/pc/shipment/shipmentHeader/mapper/ShipmentHeaderMapper.java
@@ -3,6 +3,8 @@ package com.huaheng.pc.shipment.shipmentHeader.mapper; @@ -3,6 +3,8 @@ package com.huaheng.pc.shipment.shipmentHeader.mapper;
3 import com.baomidou.mybatisplus.core.mapper.BaseMapper; 3 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; 4 import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
5 5
  6 +import java.util.List;
  7 +
6 public interface ShipmentHeaderMapper extends BaseMapper<ShipmentHeader> { 8 public interface ShipmentHeaderMapper extends BaseMapper<ShipmentHeader> {
7 9
8 /** 10 /**
@@ -11,4 +13,6 @@ public interface ShipmentHeaderMapper extends BaseMapper&lt;ShipmentHeader&gt; { @@ -11,4 +13,6 @@ public interface ShipmentHeaderMapper extends BaseMapper&lt;ShipmentHeader&gt; {
11 */ 13 */
12 String createCode(String shipmentType); 14 String createCode(String shipmentType);
13 15
  16 + List<ShipmentHeader> selectListByCreated();
  17 +
14 } 18 }
15 \ No newline at end of file 19 \ No newline at end of file
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderService.java
@@ -5,6 +5,7 @@ import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; @@ -5,6 +5,7 @@ import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
5 import com.baomidou.mybatisplus.extension.service.IService; 5 import com.baomidou.mybatisplus.extension.service.IService;
6 6
7 import java.lang.reflect.InvocationTargetException; 7 import java.lang.reflect.InvocationTargetException;
  8 +import java.util.List;
8 9
9 public interface ShipmentHeaderService extends IService<ShipmentHeader>{ 10 public interface ShipmentHeaderService extends IService<ShipmentHeader>{
10 11
@@ -22,4 +23,7 @@ public interface ShipmentHeaderService extends IService&lt;ShipmentHeader&gt;{ @@ -22,4 +23,7 @@ public interface ShipmentHeaderService extends IService&lt;ShipmentHeader&gt;{
22 //审核出库单 23 //审核出库单
23 AjaxResult review(String ids); 24 AjaxResult review(String ids);
24 25
  26 + List<ShipmentHeader> selectListByCreated();
  27 +
  28 +
25 } 29 }
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java
@@ -223,4 +223,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper, @@ -223,4 +223,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
223 } 223 }
224 return AjaxResult.success("订单审核成功,成功加入订单池"); 224 return AjaxResult.success("订单审核成功,成功加入订单池");
225 } 225 }
  226 +
  227 + @Override
  228 + public List<ShipmentHeader> selectListByCreated() {
  229 + return shipmentHeaderMapper.selectListByCreated();
  230 + }
226 } 231 }
src/main/java/com/huaheng/pc/system/user/controller/HomeController.java 0 → 100644
  1 +package com.huaheng.pc.system.user.controller;
  2 +
  3 +import com.huaheng.framework.config.HuaHengConfig;
  4 +import com.huaheng.framework.web.controller.BaseController;
  5 +import com.huaheng.framework.web.domain.AjaxResult;
  6 +import com.huaheng.pc.config.company.domain.Company;
  7 +import com.huaheng.pc.config.company.service.CompanyService;
  8 +import com.huaheng.pc.config.location.service.LocationService;
  9 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
  10 +import com.huaheng.pc.config.warehouse.service.WarehouseService;
  11 +import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
  12 +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  13 +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
  14 +import com.huaheng.pc.report.excelReport.mapper.ExcelReportMapper;
  15 +import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail;
  16 +import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService;
  17 +import com.huaheng.pc.system.menu.domain.Menu;
  18 +import com.huaheng.pc.system.menu.service.IMenuService;
  19 +import com.huaheng.pc.system.user.domain.User;
  20 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  21 +import org.springframework.beans.factory.annotation.Autowired;
  22 +import org.springframework.stereotype.Controller;
  23 +import org.springframework.ui.ModelMap;
  24 +import org.springframework.web.bind.annotation.GetMapping;
  25 +import org.springframework.web.bind.annotation.RequestMapping;
  26 +import org.springframework.web.bind.annotation.ResponseBody;
  27 +
  28 +import javax.annotation.Resource;
  29 +import java.util.*;
  30 +
  31 +@Controller
  32 +@RequestMapping("/admin")
  33 +public class HomeController extends BaseController {
  34 + @Autowired
  35 + private IMenuService menuService;
  36 + @Autowired
  37 + private HuaHengConfig huahengConfig;
  38 + @Resource
  39 + ExcelReportMapper mapper;
  40 +
  41 + @Autowired
  42 + private ReceiptDetailService receiptDetailService;
  43 + @Autowired
  44 + private ShipmentDetailService shipmentDetailService;
  45 + @Autowired
  46 + private LocationService locationService;
  47 + @Autowired
  48 + private InventoryDetailService InventoryDetailService;
  49 + @Autowired
  50 + private WarehouseService warehouseService;
  51 + @Autowired
  52 + private CompanyService companyService;
  53 +
  54 +
  55 +
  56 + private String prefix = "admin";
  57 +
  58 + //6个显示后台
  59 + @GetMapping("home/getCommonData")
  60 + @ResponseBody
  61 + public AjaxResult getCommonData(){
  62 +// String condition = " and warehouseId = " + ShiroUtils.getWarehouseId();
  63 + String bllCount = "SELECT ifnull(sum(t.a),0) 'total' from (\n" +
  64 + "SELECT COUNT(*) 'a' FROM receipt_header WHERE DATEDIFF(NOW(), created)=0 " +
  65 + " UNION \n" +
  66 + "SELECT COUNT(*) 'a' FROM shipment_header WHERE DATEDIFF(NOW(), created)=0 " +
  67 + ") t";
  68 + String receiptTotal = "SELECT ifnull(sum(t.qty),0) 'total' from task_detail t\n" +
  69 + "inner join receipt_header r on t.billCode=r.code and\n" +
  70 + "t.status>100 and DATEDIFF(NOW(), t.lastUpdated)=0;";
  71 + String shipmentTotal = "SELECT ifnull(sum(t.qty),0) 'total' from task_detail t\n" +
  72 + "inner join shipment_header s on t.billCode=s.code and\n" +
  73 + "t.status>100 and DATEDIFF(NOW(), t.lastUpdated)=0;";
  74 + String inventoryTotal = "SELECT IFNULL(SUM(qty),0) 'total' from inventory_detail where 1=1 " ;
  75 + String materialCount = "SELECT count(DISTINCT materialCode) 'total' from inventory_detail WHERE 1=1";
  76 + String taskUncompletedTotal = "SELECT COUNT(*) 'total' from task_header WHERE status < 100 " ;
  77 +
  78 + Map<String, Object> map = new HashMap<>();
  79 + List<LinkedHashMap<String, Object>> temp1 = mapper.selectCommon(bllCount);
  80 + map.put("bllCount",temp1.get(0).entrySet().iterator().next().getValue());
  81 +
  82 + List<LinkedHashMap<String, Object>> temp2 = mapper.selectCommon(receiptTotal);
  83 + map.put("receiptTotal",temp2.get(0).entrySet().stream().findFirst().get().getValue());
  84 +
  85 + List<LinkedHashMap<String, Object>> temp3 = mapper.selectCommon(shipmentTotal);
  86 + map.put("shipmentTotal",temp3.get(0).entrySet().stream().findFirst().get().getValue());
  87 +
  88 + List<LinkedHashMap<String, Object>> temp4 = mapper.selectCommon(inventoryTotal);
  89 + map.put("inventoryTotal",temp4.get(0).entrySet().stream().findFirst().get().getValue());
  90 +
  91 + List<LinkedHashMap<String, Object>> temp5 = mapper.selectCommon(materialCount);
  92 + map.put("materialCount",temp5.get(0).entrySet().stream().findFirst().get().getValue());
  93 +
  94 + List<LinkedHashMap<String, Object>> temp6 = mapper.selectCommon(taskUncompletedTotal);
  95 + map.put("taskUncompletedTotal",temp6.get(0).entrySet().stream().findFirst().get().getValue());
  96 +
  97 + return AjaxResult.success(map);
  98 + }
  99 +
  100 + //库龄展示
  101 + @GetMapping("home/getInventoryStatus")
  102 + @ResponseBody
  103 + public AjaxResult getInventoryStatus(String type){
  104 + List<Map<String, Object>> list=new ArrayList<>();
  105 + if(type.equals("1")) {
  106 + Warehouse warehouse=new Warehouse();
  107 + List<Warehouse> warehouseList=warehouseService.selectListEntityByEqual(warehouse);
  108 + for(Warehouse item:warehouseList) {
  109 + List<String> list1=new ArrayList<>();
  110 + Integer a=0;
  111 + Integer b=3;
  112 + String num1 = InventoryDetailService.getWarehouseInventoryStatus(item.getCode(),a,b);
  113 + list1.add(num1);
  114 + a=3;
  115 + b=6;
  116 + String num2 = InventoryDetailService.getWarehouseInventoryStatus(item.getCode(),a,b);
  117 + list1.add(num2);
  118 + a=6;
  119 + b=9;
  120 + String num3 = InventoryDetailService.getWarehouseInventoryStatus(item.getCode(),a,b);
  121 + list1.add(num3);
  122 + a=9;
  123 + b=12;
  124 + String num4 = InventoryDetailService.getWarehouseInventoryStatus(item.getCode(),a,b);
  125 + list1.add(num4);
  126 + a=12;
  127 + String num5 = InventoryDetailService.getWarehouseInventoryStatuss(item.getCode(),a);
  128 + list1.add(num5);
  129 + Map map=new ModelMap();
  130 + map.put("warehouseName",item.getName());
  131 + map.put("list1",list1);
  132 + list.add(map);
  133 + }
  134 + }else {
  135 + Company company=new Company();
  136 + List<Company> companyList=companyService.selectListEntityByEqual(company);
  137 + for(Company item:companyList) {
  138 + List<String> list1=new ArrayList<>();
  139 + Integer a=0;
  140 + Integer b=3;
  141 + String num1 = InventoryDetailService.getCompanyInventoryStatus(item.getCode(),a,b);
  142 + list1.add(num1);
  143 + a=3;
  144 + b=6;
  145 + String num2 = InventoryDetailService.getCompanyInventoryStatus(item.getCode(),a,b);
  146 + list1.add(num2);
  147 + a=6;
  148 + b=9;
  149 + String num3 = InventoryDetailService.getCompanyInventoryStatus(item.getCode(),a,b);
  150 + list1.add(num3);
  151 + a=9;
  152 + b=12;
  153 + String num4 = InventoryDetailService.getCompanyInventoryStatus(item.getCode(),a,b);
  154 + list1.add(num4);
  155 + a=12;
  156 + String num5 = InventoryDetailService.getCompanyInventoryStatuss(item.getCode(),a);
  157 + list1.add(num5);
  158 + Map map=new ModelMap();
  159 + map.put("companyName",item.getName());
  160 + map.put("list1",list1);
  161 + list.add(map);
  162 + }
  163 + }
  164 + return AjaxResult.success(list);
  165 + }
  166 +
  167 + //获得七天的出入库量
  168 + @GetMapping("home/getShipmentsLast7Days")
  169 + @ResponseBody
  170 + public AjaxResult getQtyLast7Days(String type){
  171 + List<TaskDetail> receiptDetails=new ArrayList<>();
  172 + List<TaskDetail> shipmentDetails=new ArrayList<>();
  173 + Map map=new ModelMap();
  174 + if(type.equals("1")) {
  175 + receiptDetails = receiptDetailService.getReceiptQtyLast7Days();
  176 + shipmentDetails = shipmentDetailService.getShipmentQtyLast7Days();
  177 + }
  178 + if(type.equals("2")){
  179 + receiptDetails =receiptDetailService.getWarehouseReceipt();
  180 + shipmentDetails=shipmentDetailService.getWarehouseShipment();
  181 + }
  182 + if(type.equals("3")){
  183 + receiptDetails =receiptDetailService.getCompanyReceipt();
  184 + shipmentDetails=shipmentDetailService.getCompanyShipment();
  185 + }
  186 + map.put("receiptDetails", receiptDetails);
  187 + map.put("shipmentDetails", shipmentDetails);
  188 + return AjaxResult.success(map);
  189 + }
  190 +
  191 + //库存分布
  192 + @GetMapping("home/getInventoryProp")
  193 + @ResponseBody
  194 + public AjaxResult getInventoryProp(String type){
  195 + List<Map<String, Object>> list=new ArrayList<>();
  196 + if(type.equals("1")) {
  197 + Warehouse warehouse=new Warehouse();
  198 + List<Warehouse> warehouseList=warehouseService.selectListEntityByEqual(warehouse);
  199 + for(Warehouse item:warehouseList) {
  200 + List<LinkedHashMap<String, Object>> list1 = InventoryDetailService.getWarehouseInventoryProp(item.getCode());
  201 + Map map=new ModelMap();
  202 + if(list1!=null && list1.size()>0) {
  203 + map.put("warehouseName",item.getName());
  204 + map.put("list1", list1);
  205 + list.add(map);
  206 + }
  207 + }
  208 + }else {
  209 + Company company=new Company();
  210 + List<Company> companyList=companyService.selectListEntityByEqual(company);
  211 + for(Company item:companyList) {
  212 + List<LinkedHashMap<String, Object>> list1 = InventoryDetailService.getCompanyInventoryProp(item.getCode());
  213 + Map map=new ModelMap();
  214 + if(list1!=null && list1.size()>0){
  215 + map.put("companyName",item.getName());
  216 + map.put("list1",list1);
  217 + list.add(map);
  218 + }
  219 + }
  220 + }
  221 + return AjaxResult.success(list);
  222 + }
  223 +
  224 + //库位利用率
  225 + @GetMapping("home/getLocationProp")
  226 + @ResponseBody
  227 + public AjaxResult getLocationProp(){
  228 + List<LinkedHashMap<String, Object>> list =locationService.getLocationProp();
  229 + return AjaxResult.success(list);
  230 + }
  231 +
  232 + @GetMapping("/home")
  233 + public String home(ModelMap mmap)
  234 + {
  235 + // 取身份信息
  236 + User user = getUser();
  237 + // 根据用户id取出菜单
  238 + List<Menu> menus = menuService.selectMenusByUserId(user.getId());
  239 + mmap.put("menus", menus);
  240 + mmap.put("user", user);
  241 + mmap.put("copyrightYear", huahengConfig.getCopyrightYear());
  242 + return prefix + "/home";
  243 + }
  244 +
  245 +
  246 + // 系统介绍
  247 + @GetMapping("/main")
  248 + public String main(ModelMap mmap) {
  249 + mmap.put("version", huahengConfig.getVersion());
  250 + return prefix + "/main";
  251 + }
  252 +}
src/main/java/com/huaheng/pc/task/taskDetail/controller/AdminTaskDetailController.java 0 → 100644
  1 +package com.huaheng.pc.task.taskDetail.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  6 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  7 +import com.huaheng.framework.web.controller.BaseController;
  8 +import com.huaheng.framework.web.page.TableDataInfo;
  9 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  10 +import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.stereotype.Controller;
  13 +import org.springframework.ui.ModelMap;
  14 +import org.springframework.web.bind.annotation.*;
  15 +
  16 +import java.util.List;
  17 +
  18 +/**
  19 + * 立库任务明细 信息操作处理
  20 + *
  21 + * @author huaheng
  22 + * @date 2018-08-19
  23 + */
  24 +@Controller
  25 +@RequestMapping("/admin/taskDetail")
  26 +public class AdminTaskDetailController extends BaseController
  27 +{
  28 + private String prefix = "admin/taskDetail";
  29 +
  30 + @Autowired
  31 + private TaskDetailService taskDetailService;
  32 +
  33 +// @RequiresPermissions("admin:task:view")
  34 + @GetMapping("/{taskId}")
  35 + public String taskDetail(@PathVariable("taskId") String taskId, ModelMap mmap)
  36 + {
  37 + mmap.put("taskId", taskId);
  38 + return prefix + "/taskDetail";
  39 + }
  40 +
  41 + /**
  42 + * 查询立库任务明细列表
  43 + */
  44 +// @RequiresPermissions("admin:task:list")
  45 + @Log(title = "任务-任务管理", operating = "查看立库任务明细", action = BusinessType.GRANT)
  46 + @PostMapping("/list")
  47 + @ResponseBody
  48 + public TableDataInfo list(TaskDetail taskDetail)
  49 + {
  50 + startPage();
  51 + LambdaQueryWrapper<TaskDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
  52 + lambdaQueryWrapper.eq(TaskDetail::getTaskId,taskDetail.getTaskId());
  53 + List<TaskDetail> list = taskDetailService.list(lambdaQueryWrapper) ;
  54 + return getDataTable(list);
  55 + }
  56 +
  57 +
  58 +}
src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java
@@ -50,6 +50,10 @@ public class TaskDetail implements Serializable { @@ -50,6 +50,10 @@ public class TaskDetail implements Serializable {
50 @ApiModelProperty(value="仓库") 50 @ApiModelProperty(value="仓库")
51 private String warehouseCode; 51 private String warehouseCode;
52 52
  53 + private String warehouseName;
  54 +
  55 + private String companyName;
  56 +
53 /** 57 /**
54 * 货主 58 * 货主
55 */ 59 */
src/main/java/com/huaheng/pc/task/taskHeader/controller/AdminTaskController.java 0 → 100644
  1 +package com.huaheng.pc.task.taskHeader.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.utils.StringUtils;
  6 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  7 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  8 +import com.huaheng.framework.web.controller.BaseController;
  9 +import com.huaheng.framework.web.page.TableDataInfo;
  10 +import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
  11 +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Controller;
  14 +import org.springframework.web.bind.annotation.GetMapping;
  15 +import org.springframework.web.bind.annotation.PostMapping;
  16 +import org.springframework.web.bind.annotation.RequestMapping;
  17 +import org.springframework.web.bind.annotation.ResponseBody;
  18 +
  19 +import java.util.ArrayList;
  20 +import java.util.List;
  21 +
  22 +/**
  23 + * 任务 信息操作处理
  24 + *
  25 + * @author huaheng
  26 + * @date 2019-05-20
  27 + */
  28 +@Controller
  29 +@RequestMapping("/admin/task")
  30 +public class AdminTaskController extends BaseController {
  31 + private String prefix = "admin/task";
  32 +
  33 + @Autowired
  34 + private TaskHeaderService taskHeaderService;
  35 +
  36 +// @RequiresPermissions("task:task:view")
  37 + @GetMapping()
  38 + public String task() {
  39 + return prefix + "/task";
  40 + }
  41 +
  42 +
  43 + /**
  44 + * 查询立库任务列表
  45 + */
  46 +// @RequiresPermissions("task:task:list")
  47 + @Log(title = "任务-任务管理", operating = "查看立库任务列表", action = BusinessType.GRANT)
  48 + @PostMapping("/list")
  49 + @ResponseBody
  50 + public TableDataInfo list(TaskHeader taskHeader, Short lastStatus) {
  51 + startPage();
  52 + LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
  53 + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(taskHeader.getWarehouseCode()),TaskHeader::getWarehouseCode, taskHeader.getWarehouseCode())
  54 + .eq(StringUtils.isNotEmpty(taskHeader.getCompanyCode()),TaskHeader::getCompanyCode,taskHeader.getCompanyCode())
  55 + .eq(StringUtils.isNotEmpty(taskHeader.getContainerCode()),TaskHeader::getContainerCode,taskHeader.getContainerCode())
  56 + .eq(StringUtils.isNotEmpty(taskHeader.getToLocation()),TaskHeader::getToLocation,taskHeader.getToLocation());
  57 + List<TaskHeader> list=new ArrayList<>();
  58 + if(lastStatus==null) {
  59 + list = taskHeaderService.list(lambdaQueryWrapper);
  60 + }else {
  61 + list = taskHeaderService.getTasksStatus(lastStatus);
  62 + }
  63 + return getDataTable(list);
  64 + }
  65 +
  66 +}
0 \ No newline at end of file 67 \ No newline at end of file
src/main/java/com/huaheng/pc/task/taskHeader/mapper/TaskHeaderMapper.java
@@ -13,4 +13,6 @@ public interface TaskHeaderMapper extends BaseMapper&lt;TaskHeader&gt; { @@ -13,4 +13,6 @@ public interface TaskHeaderMapper extends BaseMapper&lt;TaskHeader&gt; {
13 13
14 Integer UncompleteCount(@Param("containerCode") String containerCode, @Param("warehouseCode") String warehouseCode); 14 Integer UncompleteCount(@Param("containerCode") String containerCode, @Param("warehouseCode") String warehouseCode);
15 15
  16 + List<TaskHeader> getTasksStatus(Short lastStatus);
  17 +
16 } 18 }
17 \ No newline at end of file 19 \ No newline at end of file
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
@@ -41,5 +41,5 @@ public interface TaskHeaderService extends IService&lt;TaskHeader&gt;{ @@ -41,5 +41,5 @@ public interface TaskHeaderService extends IService&lt;TaskHeader&gt;{
41 41
42 List<TaskHeader> preferenceRealize (List<TaskHeader> taskHeaderList); 42 List<TaskHeader> preferenceRealize (List<TaskHeader> taskHeaderList);
43 43
44 - 44 + List<TaskHeader> getTasksStatus(Short lastStatus);
45 } 45 }
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
@@ -142,6 +142,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -142,6 +142,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
142 return taskHeaders; 142 return taskHeaders;
143 } 143 }
144 144
  145 + @Override
  146 + public List<TaskHeader> getTasksStatus(Short lastStatus) {
  147 + return taskHeaderMapper.getTasksStatus(lastStatus);
  148 + }
  149 +
145 /** 150 /**
146 * 查询容器有无任务 151 * 查询容器有无任务
147 */ 152 */
@@ -701,7 +706,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -701,7 +706,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
701 Location temp1 = new Location(); 706 Location temp1 = new Location();
702 temp1.setCode(sourceLocation); 707 temp1.setCode(sourceLocation);
703 temp1.setWarehouseCode(ShiroUtils.getWarehouseCode()); 708 temp1.setWarehouseCode(ShiroUtils.getWarehouseCode());
704 - LambdaQueryWrapper<Location> lambda1 = Wrappers.lambdaQuery(); 709 + LambdaQueryWrapper<Location> lambda1 = Wrappers.lambdaQuery(temp1);
705 Location loc1 = locationService.getOne(lambda1); 710 Location loc1 = locationService.getOne(lambda1);
706 if (loc1 == null) { 711 if (loc1 == null) {
707 return AjaxResult.error("源库位:" + sourceLocation + "未找到"); 712 return AjaxResult.error("源库位:" + sourceLocation + "未找到");
@@ -745,7 +750,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -745,7 +750,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
745 TaskHeader taskHeader = new TaskHeader(); 750 TaskHeader taskHeader = new TaskHeader();
746 taskHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); 751 taskHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());
747 taskHeader.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0));//获取第一个货主 752 taskHeader.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0));//获取第一个货主
748 - taskHeader.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_CHECK); 753 + taskHeader.setInternalTaskType(QuantityConstant.TASK_INTENERTYPE_TRANSFER);
749 taskHeader.setTaskType(QuantityConstant.TASK_TYPE_TRANSFER); 754 taskHeader.setTaskType(QuantityConstant.TASK_TYPE_TRANSFER);
750 taskHeader.setContainerCode(loc1.getContainerCode()); 755 taskHeader.setContainerCode(loc1.getContainerCode());
751 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); 756 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
src/main/resources/application-dev.yml
@@ -66,4 +66,4 @@ logging: @@ -66,4 +66,4 @@ logging:
66 server: 66 server:
67 port: 8888 67 port: 8888
68 servlet: 68 servlet:
69 - context-path: /twms/ 69 - context-path: /twms/
  70 + context-path: /twms/
70 \ No newline at end of file 71 \ No newline at end of file
src/main/resources/application-druid.properties
@@ -46,5 +46,5 @@ logging.level.org.springframework=warn @@ -46,5 +46,5 @@ logging.level.org.springframework=warn
46 logging.level.spring.springboot.dao=DEBUG 46 logging.level.spring.springboot.dao=DEBUG
47 47
48 #\u6D4B\u8BD5\u670D\u52A1\u7AEF\u53E3\u3001\u6D4B\u8BD5\u9879\u76EEcontextPath 48 #\u6D4B\u8BD5\u670D\u52A1\u7AEF\u53E3\u3001\u6D4B\u8BD5\u9879\u76EEcontextPath
49 -server.port=8888  
50 -server.servlet.context-path=/twms/ 49 +server.port=
  50 +server.servlet.context-path=
src/main/resources/mybatis/config/CompanyMapper.xml
@@ -58,4 +58,76 @@ @@ -58,4 +58,76 @@
58 where company.warehouseCode = #{warehouseCode} 58 where company.warehouseCode = #{warehouseCode}
59 </select> 59 </select>
60 60
  61 + <select id="selectListEntityByEqual" resultType="com.huaheng.pc.config.company.domain.Company">
  62 + SELECT id, code, warehouseCode, `name`, attentionTo, address1, address2, district, city,
  63 + province, country, postalCode, phoneNum, mobile, email, created, createdBy, lastUpdated, lastUpdatedBy,
  64 + version, userDef1, userDef2, userDef3, processStamp
  65 + FROM company
  66 + <where>
  67 + <if test="id != null">
  68 + AND id = #{id}
  69 + </if>
  70 + <if test="code != null">
  71 + AND code = #{code}
  72 + </if>
  73 + <if test="name != null">
  74 + AND name = #{name}
  75 + </if>
  76 + <if test="address1 != null">
  77 + AND address1 = #{address1}
  78 + </if>
  79 + <if test="address2 != null">
  80 + AND address2 = #{address2}
  81 + </if>
  82 + <if test="city != null">
  83 + AND city = #{city}
  84 + </if>
  85 + <if test="province != null">
  86 + AND province = #{province}
  87 + </if>
  88 + <if test="country != null">
  89 + AND country = #{country}
  90 + </if>
  91 + <if test="postalCode != null">
  92 + AND postalCode = #{postalCode}
  93 + </if>
  94 + <if test="attentionTo != null">
  95 + AND attentionTo = #{attentionTo}
  96 + </if>
  97 + <if test="phoneNum != null">
  98 + AND phoneNum = #{phoneNum}
  99 + </if>
  100 + <if test="mobile != null">
  101 + AND mobile = #{mobile}
  102 + </if>
  103 + <if test="email != null">
  104 + AND email = #{email}
  105 + </if>
  106 + <if test="created != null">
  107 + AND created = #{created}
  108 + </if>
  109 + <if test="createdBy != null">
  110 + AND createdBy = #{createdBy}
  111 + </if>
  112 + <if test="lastUpdated != null">
  113 + AND lastUpdated = #{lastUpdated}
  114 + </if>
  115 + <if test="lastUpdatedBy != null">
  116 + AND lastUpdatedBy = #{lastUpdatedBy}
  117 + </if>
  118 + <if test="deleted != null">
  119 + AND deleted = #{deleted}
  120 + </if>
  121 + <if test="userDef1 != null">
  122 + AND userDef1 = #{userDef1}
  123 + </if>
  124 + <if test="userDef2 != null">
  125 + AND userDef2 = #{userDef2}
  126 + </if>
  127 + <if test="userDef3 != null">
  128 + AND userDef3 = #{userDef3}
  129 + </if>
  130 + </where>
  131 + </select>
  132 +
61 </mapper> 133 </mapper>
62 \ No newline at end of file 134 \ No newline at end of file
src/main/resources/mybatis/config/LocationMapper.xml
@@ -87,4 +87,11 @@ @@ -87,4 +87,11 @@
87 select max(iRow) as iRow,max(iColumn) as iColumn,max(iLayer) as iLayer,max(iGrid) as iGrid from location l where l.warehouseCode=#{warehouseCode} AND l.locationType=#{type} 87 select max(iRow) as iRow,max(iColumn) as iColumn,max(iLayer) as iLayer,max(iGrid) as iGrid from location l where l.warehouseCode=#{warehouseCode} AND l.locationType=#{type}
88 </select> 88 </select>
89 89
  90 + <select id="getLocationProp" resultType="java.util.LinkedHashMap">
  91 + SELECT w.name warehouseName,ifnull(convert(a.num1/(b.num2+a.num1),decimal(15,2)),0) '有货',ifnull(convert(b.num2/(b.num2+a.num1),decimal(15,2)),0) '无货' from warehouse w
  92 + left join
  93 + (SELECT count(1) num1,warehouseCode FROM location WHERE containerCode!='' GROUP BY warehouseCode) a on a.warehouseCode=w.code
  94 + LEFT JOIN
  95 + (SELECT count(1) num2,warehouseCode FROM location WHERE containerCode ='' GROUP BY warehouseCode) b on b.warehouseCode=w.code
  96 + </select>
90 </mapper> 97 </mapper>
91 \ No newline at end of file 98 \ No newline at end of file
src/main/resources/mybatis/config/WarehouseMapper.xml
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 code, address1, address2, city, `state`, district, country, postalCode, attentionTo, 59 code, address1, address2, city, `state`, district, country, postalCode, attentionTo,
60 phoneNum, faxNum, email, hostCode, `name`, `enable`, orgCode, created, createdBy, 60 phoneNum, faxNum, email, hostCode, `name`, `enable`, orgCode, created, createdBy,
61 lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, 61 lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5,
62 - userDef6, userDef7, userDef8, delete 62 + userDef6, userDef7, userDef8, deleted
63 </sql> 63 </sql>
64 64
65 <insert id="companyCopy"> 65 <insert id="companyCopy">
@@ -67,6 +67,87 @@ @@ -67,6 +67,87 @@
67 select #{newWarehouseCode},companyId,companyCode from warehouse_company where warehouseCode=#{warehouseCode} 67 select #{newWarehouseCode},companyId,companyCode from warehouse_company where warehouseCode=#{warehouseCode}
68 </insert> 68 </insert>
69 69
  70 + <select id="selectListEntityByEqual" resultType="com.huaheng.pc.config.warehouse.domain.Warehouse">
  71 + SELECT code, name, address1, address2, city, state, district, country, postalCode, attentionTo, phoneNum, faxNum,
  72 + email, hostCode,orgCode, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3
  73 + FROM warehouse
  74 + <where>
  75 + <if test="code != null">
  76 + AND code = #{code}
  77 + </if>
  78 + <if test="name != null">
  79 + AND name = #{name}
  80 + </if>
  81 + <if test="address1 != null">
  82 + AND address1 = #{address1}
  83 + </if>
  84 + <if test="address2 != null">
  85 + AND address2 = #{address2}
  86 + </if>
  87 + <if test="city != null">
  88 + AND city = #{city}
  89 + </if>
  90 + <if test="state != null">
  91 + AND state = #{state}
  92 + </if>
  93 + <if test="district != null">
  94 + AND district = #{district}
  95 + </if>
  96 + <if test="country != null">
  97 + AND country = #{country}
  98 + </if>
  99 + <if test="postalCode != null">
  100 + AND postalCode = #{postalCode}
  101 + </if>
  102 + <if test="attentionTo != null">
  103 + AND attentionTo = #{attentionTo}
  104 + </if>
  105 + <if test="phoneNum != null">
  106 + AND phoneNum = #{phoneNum}
  107 + </if>
  108 + <if test="faxNum != null">
  109 + AND faxNum = #{faxNum}
  110 + </if>
  111 + <if test="email != null">
  112 + AND email = #{email}
  113 + </if>
  114 + <if test="hostCode != null">
  115 + AND hostCode = #{hostCode}
  116 + </if>
  117 + <if test="orgCode != null">
  118 + AND orgCode = #{orgCode}
  119 + </if>
  120 + <if test="created != null">
  121 + AND created = #{created}
  122 + </if>
  123 + <if test="createdBy != null">
  124 + AND createdBy = #{createdBy}
  125 + </if>
  126 + <if test="lastUpdated != null">
  127 + AND lastUpdated = #{lastUpdated}
  128 + </if>
  129 + <if test="lastUpdatedBy != null">
  130 + AND lastUpdatedBy = #{lastUpdatedBy}
  131 + </if>
  132 + <if test="enable != null">
  133 + AND enable = #{enable}
  134 + </if>
  135 + <if test="deleted != null">
  136 + AND deleted = #{deleted}
  137 + </if>
  138 + <if test="userDef1 != null">
  139 + AND userDef1 = #{userDef1}
  140 + </if>
  141 + <if test="userDef2 != null">
  142 + AND userDef2 = #{userDef2}
  143 + </if>
  144 + <if test="userDef3 != null">
  145 + AND userDef3 = #{userDef3}
  146 + </if>
  147 + </where>
  148 + </select>
  149 +
  150 +
70 <insert id="userCopy"> 151 <insert id="userCopy">
71 insert into sys_user_warehouse(userId,warehouseCode) 152 insert into sys_user_warehouse(userId,warehouseCode)
72 select userId,#{newWarehouseCode} from sys_user_warehouse where warehouseCode=#{warehouseCode} 153 select userId,#{newWarehouseCode} from sys_user_warehouse where warehouseCode=#{warehouseCode}
src/main/resources/mybatis/inventory/InventoryDetailMapper.xml
@@ -67,4 +67,85 @@ @@ -67,4 +67,85 @@
67 and companyCode = #{companyCode} 67 and companyCode = #{companyCode}
68 </if> 68 </if>
69 </select> 69 </select>
  70 +
  71 + <select id="getWarehouseInventoryStatus" resultType="java.lang.String">
  72 + SELECT
  73 + ifnull(
  74 + CONVERT (
  75 + ( SELECT count( 1 ) FROM inventory_detail WHERE TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) >= #{a}
  76 + and TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) &lt;#{b}
  77 + AND warehouseCode = #{warehouseCode} ) / ( SELECT count( 1 ) FROM inventory_detail WHERE warehouseCode = #{warehouseCode} ),
  78 + DECIMAL ( 15, 2 )
  79 + ),
  80 + 0
  81 + ) scale
  82 + FROM
  83 + DUAL
  84 + </select>
  85 +
  86 + <select id="getWarehouseInventoryStatuss" resultType="java.lang.String">
  87 + SELECT
  88 + ifnull(
  89 + CONVERT (
  90 + ( SELECT count( 1 ) FROM inventory_detail WHERE TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) >= #{a} AND warehouseCode = #{warehouseCode} ) / ( SELECT count( 1 ) FROM inventory_detail WHERE warehouseCode = #{warehouseCode} ),
  91 + DECIMAL ( 15, 2 )
  92 + ),
  93 + 0
  94 + ) scale
  95 + FROM
  96 + DUAL
  97 + </select>
  98 +
  99 + <select id="getCompanyInventoryStatus" resultType="java.lang.String">
  100 + SELECT
  101 + ifnull(
  102 + CONVERT (
  103 + ( SELECT count( 1 ) FROM inventory_detail WHERE TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) >= #{a}
  104 + and TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) &lt;#{b}
  105 + AND companyCode = #{companyCode} ) / ( SELECT count( 1 ) FROM inventory_detail WHERE companyCode = #{companyCode} ),
  106 + DECIMAL ( 15, 2 )
  107 + ),
  108 + 0
  109 + ) scale
  110 + FROM
  111 + DUAL
  112 + </select>
  113 +
  114 + <select id="getCompanyInventoryStatuss" resultType="java.lang.String">
  115 + SELECT
  116 + ifnull(
  117 + CONVERT (
  118 + ( SELECT count( 1 ) FROM inventory_detail WHERE TIMESTAMPDIFF( MONTH, created, CURDATE( ) ) >= #{a}
  119 + AND companyCode = #{companyCode} ) / ( SELECT count( 1 ) FROM inventory_detail WHERE companyCode = #{companyCode} ),
  120 + DECIMAL ( 15, 2 )
  121 + ),
  122 + 0
  123 + ) scale
  124 + FROM
  125 + DUAL
  126 + </select>
  127 +
  128 + <select id="getWarehouseInventoryProp" resultType="java.util.LinkedHashMap">
  129 +-- SELECT w.name,a.name,ifnull(a.total,0) total from warehouse w
  130 +-- left join
  131 +-- (SELECT m.name name,sum(i.qty) total,i.warehouseCode warehouseCode from inventory i
  132 +-- inner join material m on i.materialCode = m.`code` and i.warehouseId = m.warehouseId
  133 +-- GROUP BY m.name,i.warehouseCode) a on w.code=a.warehouseCode ORDER BY total desc
  134 + SELECT m.name name,sum(i.qty) total from inventory_detail i
  135 + inner join material m on i.materialCode = m.`code` and i.warehouseCode = m.warehouseCode and i.warehouseCode=#{warehouseCode}
  136 + GROUP BY m.code ORDER BY total desc limit 10
  137 + </select>
  138 +
  139 + <select id="getCompanyInventoryProp" resultType="java.util.LinkedHashMap">
  140 +-- SELECT c.name,a.name,ifnull(a.total,0) total from company c
  141 +-- left join
  142 +-- (SELECT m.name name,sum(i.qty) total,i.companyId companyId from inventory i
  143 +-- inner join material m on i.materialCode = m.`code` and i.companyId = m.companyId
  144 +-- GROUP BY m.name,i.companyId) a on c.id=a.companyId ORDER BY total desc
  145 + SELECT m.name name,sum(i.qty) total from inventory_detail i
  146 + inner join material m on i.materialCode = m.`code` and i.companyCode = m.companyCode and i.companyCode=#{companyCode}
  147 + GROUP BY m.code ORDER BY total desc limit 10
  148 + </select>
  149 +
  150 +
70 </mapper> 151 </mapper>
71 \ No newline at end of file 152 \ No newline at end of file
src/main/resources/mybatis/receipt/ReceiptDetailMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.huaheng.pc.receipt.receiptDetail.mapper.ReceiptDetailMapper">
  4 + <resultMap id="BaseResultMap" type="com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail">
  5 + <!--@mbg.generated-->
  6 + <id column="id" jdbcType="INTEGER" property="id" />
  7 + <result column="receiptId" jdbcType="INTEGER" property="receiptId" />
  8 + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  9 + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
  10 + <result column="receiptCode" jdbcType="VARCHAR" property="receiptCode" />
  11 + <result column="materialCode" jdbcType="VARCHAR" property="materialCode" />
  12 + <result column="materialName" jdbcType="VARCHAR" property="materialName" />
  13 + <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" />
  14 + <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" />
  15 + <result column="supplierCode" jdbcType="VARCHAR" property="supplierCode" />
  16 + <result column="batch" jdbcType="VARCHAR" property="batch" />
  17 + <result column="lot" jdbcType="VARCHAR" property="lot" />
  18 + <result column="qcCheck" jdbcType="VARCHAR" property="qcCheck" />
  19 + <result column="projectNo" jdbcType="VARCHAR" property="projectNo" />
  20 + <result column="manufactureDate" jdbcType="TIMESTAMP" property="manufactureDate" />
  21 + <result column="expirationDate" jdbcType="TIMESTAMP" property="expirationDate" />
  22 + <result column="agingDate" jdbcType="TIMESTAMP" property="agingDate" />
  23 + <result column="attributeTemplateCode" jdbcType="VARCHAR" property="attributeTemplateCode" />
  24 + <result column="attribute1" jdbcType="VARCHAR" property="attribute1" />
  25 + <result column="attribute2" jdbcType="VARCHAR" property="attribute2" />
  26 + <result column="attribute3" jdbcType="VARCHAR" property="attribute3" />
  27 + <result column="attribute4" jdbcType="VARCHAR" property="attribute4" />
  28 + <result column="totalQty" jdbcType="DECIMAL" property="totalQty" />
  29 + <result column="openQty" jdbcType="DECIMAL" property="openQty" />
  30 + <result column="referCode" jdbcType="VARCHAR" property="referCode" />
  31 + <result column="referId" jdbcType="INTEGER" property="referId" />
  32 + <result column="referLineNum" jdbcType="VARCHAR" property="referLineNum" />
  33 + <result column="locatingRule" jdbcType="VARCHAR" property="locatingRule" />
  34 + <result column="inventorySts" jdbcType="VARCHAR" property="inventorySts" />
  35 + <result column="itemListPrice" jdbcType="DECIMAL" property="itemListPrice" />
  36 + <result column="itemNetPrice" jdbcType="DECIMAL" property="itemNetPrice" />
  37 + <result column="isVirtualBom" jdbcType="INTEGER" property="isVirtualBom" />
  38 + <result column="created" jdbcType="TIMESTAMP" property="created" />
  39 + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  40 + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
  41 + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
  42 + <result column="version" jdbcType="INTEGER" property="version" />
  43 + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
  44 + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
  45 + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
  46 + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" />
  47 + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" />
  48 + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" />
  49 + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" />
  50 + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
  51 + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
  52 + <result column="deleted" jdbcType="BIT" property="deleted" />
  53 + <result column="statusFlowCode" jdbcType="VARCHAR" property="statusFlowCode" />
  54 + </resultMap>
  55 + <sql id="Base_Column_List">
  56 + <!--@mbg.generated-->
  57 + id, receiptId,warehouseCode, companyCode, receiptCode, materialCode, materialName, materialSpec, materialUnit,
  58 + supplierCode, batch, lot, qcCheck, projectNo, manufactureDate, expirationDate, agingDate,
  59 + attributeTemplateCode, attribute1, attribute2, attribute3, attribute4, totalQty,
  60 + openQty, referCode, referId, referLineNum,locatingRule,inventorySts,itemListPrice,
  61 + itemNetPrice, isVirtualBom, created, createdBy, lastUpdated, lastUpdatedBy,
  62 + version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8,
  63 + processStamp, deleted,statusFlowCode
  64 + </sql>
  65 +
  66 + <select id="getReceiptQtyLast7Days" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  67 +SELECT
  68 + a.click_date AS lastUpdated,
  69 + ifnull( b.taskQty, 0 ) AS qty
  70 +FROM
  71 + (
  72 + SELECT
  73 + curdate( ) AS click_date UNION ALL
  74 + SELECT
  75 + date_sub( curdate( ), INTERVAL 1 DAY ) AS click_date UNION ALL
  76 + SELECT
  77 + date_sub( curdate( ), INTERVAL 2 DAY ) AS click_date UNION ALL
  78 + SELECT
  79 + date_sub( curdate( ), INTERVAL 3 DAY ) AS click_date UNION ALL
  80 + SELECT
  81 + date_sub( curdate( ), INTERVAL 4 DAY ) AS click_date UNION ALL
  82 + SELECT
  83 + date_sub( curdate( ), INTERVAL 5 DAY ) AS click_date UNION ALL
  84 + SELECT
  85 + date_sub( curdate( ), INTERVAL 6 DAY ) AS click_date
  86 + ) a
  87 + LEFT JOIN (
  88 + SELECT
  89 + DATE( r.lastUpdated ) AS date,
  90 + SUM( r.qty ) AS taskQty
  91 + FROM
  92 + task_detail r
  93 + WHERE
  94 + r.taskType = 100 and
  95 + r.lastUpdated >= DATE_SUB( CURDATE( ), INTERVAL 7 DAY )
  96 + AND r.status>90
  97 + GROUP BY
  98 + DATE(r.lastUpdated )
  99 + ) b ON a.click_date = b.date
  100 +ORDER BY
  101 + a.click_date;
  102 + </select>
  103 +
  104 + <select id="getWarehouseReceipt" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  105 + SELECT ifnull(sum(r.qty),0) as qty,w.name as warehouseName from warehouse w
  106 + left JOIN task_detail r on r.warehouseCode=w.code and r.status>90 and r.taskType =100
  107 + and date(r.lastUpdated)=CURDATE() group by w.code
  108 +
  109 + </select>
  110 +
  111 +
  112 + <select id="getCompanyReceipt" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  113 + SELECT ifnull(sum(r.qty),0) as qty,c.name as companyName from company c
  114 + left JOIN task_detail r on r.companyCode=c.code and r.status>90 and r.taskType =100
  115 + and date(r.lastUpdated)=CURDATE() group by c.code
  116 + </select>
  117 +</mapper>
0 \ No newline at end of file 118 \ No newline at end of file
src/main/resources/mybatis/receipt/ReceiptHeaderMapper.xml
@@ -53,4 +53,10 @@ @@ -53,4 +53,10 @@
53 version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, 53 version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8,
54 processStamp, deleted 54 processStamp, deleted
55 </sql> 55 </sql>
  56 +
  57 + <select id="selectListByCreated" resultType="com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader">
  58 + SELECT r.* from receipt_header r
  59 + inner join task_detail t on t.billCode=r.code and
  60 + t.status>700 and DATEDIFF(NOW(), t.lastUpdated)=0 GROUP BY r.code
  61 + </select>
56 </mapper> 62 </mapper>
57 \ No newline at end of file 63 \ No newline at end of file
src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml
@@ -86,6 +86,58 @@ @@ -86,6 +86,58 @@
86 WHERE shipmentId=#{id} 86 WHERE shipmentId=#{id}
87 </select> 87 </select>
88 88
  89 + <select id="getShipmentQtyLast7Days" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  90 +SELECT
  91 + a.click_date AS lastUpdated,
  92 + ifnull( b.taskQty, 0 ) AS qty
  93 +FROM
  94 + (
  95 + SELECT
  96 + curdate( ) AS click_date UNION ALL
  97 + SELECT
  98 + date_sub( curdate( ), INTERVAL 1 DAY ) AS click_date UNION ALL
  99 + SELECT
  100 + date_sub( curdate( ), INTERVAL 2 DAY ) AS click_date UNION ALL
  101 + SELECT
  102 + date_sub( curdate( ), INTERVAL 3 DAY ) AS click_date UNION ALL
  103 + SELECT
  104 + date_sub( curdate( ), INTERVAL 4 DAY ) AS click_date UNION ALL
  105 + SELECT
  106 + date_sub( curdate( ), INTERVAL 5 DAY ) AS click_date UNION ALL
  107 + SELECT
  108 + date_sub( curdate( ), INTERVAL 6 DAY ) AS click_date
  109 + ) a
  110 + LEFT JOIN (
  111 + SELECT
  112 + DATE( r.lastUpdated ) AS date,
  113 + SUM( r.qty ) AS taskQty
  114 + FROM
  115 + task_detail r
  116 + WHERE
  117 + r.taskType = 200 and
  118 + r.lastUpdated >= DATE_SUB( CURDATE( ), INTERVAL 7 DAY )
  119 + AND r.status> 90
  120 + GROUP BY
  121 + DATE(r.lastUpdated )
  122 + ) b ON a.click_date = b.date
  123 +ORDER BY
  124 + a.click_date;
  125 + </select>
  126 +
  127 +
  128 + <select id="getWarehouseShipment" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  129 + SELECT ifnull(sum(r.qty),0) as qty,w.name as warehouseName from warehouse w
  130 + left JOIN task_detail r on r.warehouseCode=w.code and r.status>90 and r.taskType =200
  131 + and date(r.lastUpdated)=CURDATE() group by w.code
  132 + </select>
  133 +
  134 +
  135 + <select id="getCompanyShipment" resultType="com.huaheng.pc.task.taskDetail.domain.TaskDetail">
  136 + SELECT ifnull(sum(r.qty),0) as qty,c.name as companyName from company c
  137 + left JOIN task_detail r on r.companyCode=c.code and r.status>90 and r.taskType =200
  138 + and date(r.lastUpdated)=CURDATE() group by c.code
  139 + </select>
  140 +
89 <insert id="insertDetails"> 141 <insert id="insertDetails">
90 insert into shipment_detail( 142 insert into shipment_detail(
91 shipmentId, warehouseCode, companyCode, shipmentCode, referCode, referId, referLineNum, 143 shipmentId, warehouseCode, companyCode, shipmentCode, referCode, referId, referLineNum,
src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml
@@ -70,4 +70,9 @@ @@ -70,4 +70,9 @@
70 SELECT code FROM shipment_header WHERE shipmentType = #{shipmentType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1 70 SELECT code FROM shipment_header WHERE shipmentType = #{shipmentType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1
71 </select> 71 </select>
72 72
  73 + <select id="selectListByCreated" resultType="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader">
  74 + SELECT s.* from shipment_header s
  75 + inner join task_detail t on t.billCode=s.code and
  76 + t.status>700 and DATEDIFF(NOW(), t.lastUpdated)=0 GROUP BY s.code
  77 + </select>
73 </mapper> 78 </mapper>
74 \ No newline at end of file 79 \ No newline at end of file
src/main/resources/mybatis/task/TaskHeaderMapper.xml
@@ -58,7 +58,11 @@ @@ -58,7 +58,11 @@
58 SELECT COUNT(*) AS count FROM task_header WHERE status &lt; 10 AND containerCode = #{containerCode} AND warehouseCode=#{warehouseCode} 58 SELECT COUNT(*) AS count FROM task_header WHERE status &lt; 10 AND containerCode = #{containerCode} AND warehouseCode=#{warehouseCode}
59 </select> 59 </select>
60 60
61 - 61 + <select id="getTasksStatus" resultType="com.huaheng.pc.task.taskHeader.domain.TaskHeader">
  62 + select *
  63 + FROM task
  64 + where lastStatus &lt; 100
  65 + </select>
62 66
63 67
64 <sql id="Base_Column_List"> 68 <sql id="Base_Column_List">
src/main/resources/templates/admin/inventory/inventory.html
@@ -9,61 +9,59 @@ @@ -9,61 +9,59 @@
9 <form id="inventory-form"> 9 <form id="inventory-form">
10 <div class="select-list"> 10 <div class="select-list">
11 <ul> 11 <ul>
12 - <li>  
13 - 库位编号:<input type="text" name="locationCode"/>  
14 - </li>  
15 <li> 12 <li>
16 - 容器编号:<input type="text" name="containerCode"/> 13 + 库存头ID:<input id="inventoryHeaderId" type="text" name="inventoryHeaderId"/>
17 </li> 14 </li>
18 <li> 15 <li>
19 - 仓库编码:<input type="text" name="warehouseCode"/> 16 + 库位编号:<input id="locationCode" type="text" name="locationCode"/>
20 </li> 17 </li>
21 <li> 18 <li>
22 - u8仓库:<select name="uWarehouseCode" th:with="warehouse=${@warehouse.selectList()}">  
23 - <option value="">所有</option>  
24 - <option th:each="e : ${warehouse}" th:text="${e['uWarehouseName']}" th:value="${e['uWarehouseCode']}"></option></select> 19 + 容器编号:<input id="containerCode" type="text" name="containerCode"/>
25 </li> 20 </li>
26 - <li>  
27 - 储货库区:<input type="text" name="zoneCode"/>  
28 - </li>  
29 <li> 21 <li>
30 - 存货编码:<input type="text" name="materialCode"/> 22 + 物料编码:<input type="text" name="materialCode"/>
31 </li> 23 </li>
32 - <li>  
33 - 存货代码:<input type="text" name="materialOldCode"/>  
34 - </li>  
35 <li> 24 <li>
36 物料名称:<input type="text" name="materialName"/> 25 物料名称:<input type="text" name="materialName"/>
37 </li> 26 </li>
38 - <li>  
39 - 库存状态:  
40 - <select name="status" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">  
41 - <option value="">所有</option>  
42 - <option th:each="e : ${inventoryStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>  
43 - </select>  
44 - </li>  
45 - <li class="time" style="height:30px">  
46 - <label>创建时间: </label>  
47 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>  
48 - <span>-</span>  
49 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 27 + <li>
  28 + 物料规格:<input type="text" name="materialSpec"/>
50 </li> 29 </li>
51 - <!--<li>  
52 - 物料类型:  
53 - <select name="materialType" th:with="type=${@dict.getType('materialType')}"> 30 + <li>
  31 + 库存状态:
  32 + <select name="inventorySts" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}">
54 <option value="">所有</option> 33 <option value="">所有</option>
55 - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> 34 + <option th:each="e : ${inventoryStatus}" th:text="${e['dictLabel']}"
  35 + th:value="${e['dictValue']}"></option>
56 </select> 36 </select>
57 - </li>--> 37 + </li>
58 <li> 38 <li>
59 供应商编码:<input type="text" name="supplierCode"/> 39 供应商编码:<input type="text" name="supplierCode"/>
60 </li> 40 </li>
  41 + <li>
  42 + 货主编码:<input type="text" name="companyCode"/>
  43 + </li>
  44 + <li>
  45 + 上游单号:<input type="text" name="referCode"/>
  46 + </li>
  47 + <li>
  48 + 上游行号:<input type="text" name="referDetailId"/>
  49 + </li>
  50 + <li>
  51 + 入库编码:<input type="text" name="receiptCode"/>
  52 + </li>
  53 + <li>
  54 + 入库明细ID:<input type="text" name="receiptDetailId"/>
  55 + </li>
61 56
62 <li> 57 <li>
63 - 项 目 号:<input type="text" name="project"/> 58 + 项 目 号:<input type="text" name="projectNo"/>
64 </li> 59 </li>
65 <li> 60 <li>
66 - 物料规格:<input type="text" name="materialSpec"/> 61 + 批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次:<input type="text" name="batch"/>
  62 + </li>
  63 + <li>
  64 + 批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:<input type="text" name="lot"/>
67 </li> 65 </li>
68 <li> 66 <li>
69 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 67 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -98,189 +96,190 @@ @@ -98,189 +96,190 @@
98 columns: [{ 96 columns: [{
99 checkbox: true 97 checkbox: true
100 }, 98 },
101 - {  
102 - field : 'id',  
103 - title : '库存ID',  
104 - sortable:true  
105 - },  
106 - /*{  
107 - field : 'locationId',  
108 - title : '库位Id' ,  
109 - visible:false  
110 - },*/  
111 - {  
112 - field : 'locationCode',  
113 - title : '库位编号'  
114 - },  
115 - {  
116 - field : 'containerCode',  
117 - title : '容器编号'  
118 - },  
119 - {  
120 - field : 'zoneCode',  
121 - title : '储货库区' ,  
122 - },  
123 - {  
124 - field : 'materialCode',  
125 - title : '存货编码'  
126 - },  
127 - {  
128 - field : 'materialOldCode',  
129 - title : '存货代码'  
130 - },  
131 - {  
132 - field : 'materialName',  
133 - title : '物料名称'  
134 - },  
135 - {  
136 - field : 'materialSpec',  
137 - title : '物料规格'  
138 - },  
139 - {  
140 - field : 'qty',  
141 - title : '数量'  
142 - },  
143 - {  
144 - field : 'taskQty',  
145 - title : '预定执行数量'  
146 - },  
147 - // {  
148 - // field : 'zoneCode',  
149 - // title : '物料库区',  
150 - // visible:true  
151 - // },  
152 - {  
153 - field : 'sourceCode',  
154 - title : '上游系统单号',  
155 - visible:true  
156 - },  
157 - {  
158 - field : 'uWarehouseCode',  
159 - title : 'u8仓库',  
160 - visible:true  
161 - },  
162 - {  
163 - field : 'sourceLine',  
164 - title : '上游系统行号',  
165 - visible:true  
166 - },  
167 - /*{  
168 - field : 'companyId',  
169 - title : '货主Id',  
170 - visible:false  
171 - },*/  
172 - {  
173 - field : 'companyCode',  
174 - title : '货主编码'  
175 - }, 99 + {
  100 + field: 'id',
  101 + title: '明细ID',
  102 + sortable: true
  103 + },
  104 + {
  105 + field: 'inventoryHeaderId',
  106 + title: '库存头ID'
  107 + },
  108 + {
  109 + field: 'locationCode',
  110 + title: '库位编号'
  111 + },
  112 + {
  113 + field: 'containerCode',
  114 + title: '容器编号'
  115 + },
  116 +
  117 + {
  118 + field: 'materialCode',
  119 + title: '存货编码'
  120 + },
176 121
177 - {  
178 - field : 'receiptId',  
179 - title : '入库单标识' ,  
180 - visible:false  
181 - },  
182 - {  
183 - field : 'receiptCode',  
184 - title : '入库单编码'  
185 - },  
186 - {  
187 - field : 'receiptDetailId',  
188 - title : '入库单明细标识' ,  
189 - visible:false  
190 - },  
191 - {  
192 - field : 'batch',  
193 - title : '批次' ,  
194 - sortable:false,  
195 - visible:false  
196 - },  
197 - {  
198 - field : 'lot',  
199 - title : '批号' ,  
200 - sortable:false,  
201 - visible:false  
202 - },  
203 - {  
204 - field : 'project',  
205 - title : '项目号' ,  
206 - sortable:true  
207 - },  
208 - {  
209 - field : 'supplierCode',  
210 - title : '供应商编码',  
211 - visible:true  
212 - },  
213 - {  
214 - field : 'manufactureDate',  
215 - title : '生产日期' ,  
216 - sortable:true ,  
217 - visible:false  
218 - },  
219 - {  
220 - field : 'expirationDate',  
221 - title : '失效日期' ,  
222 - sortable:true ,  
223 - visible:false  
224 - },  
225 - {  
226 - field : 'status',  
227 - title : '库存状态' ,  
228 - align: 'center',  
229 - formatter: function(value, row, index) {  
230 - return $.table.selectDictLabel(inventoryStatus, value);  
231 - }  
232 - }, 122 + {
  123 + field: 'materialName',
  124 + title: '物料名称'
  125 + },
  126 + {
  127 + field: 'materialSpec',
  128 + title: '物料规格'
  129 + },
  130 + {
  131 + field: 'materialUnit',
  132 + title: '物料单位'
  133 + },
  134 + {
  135 + field: 'qty',
  136 + title: '库存数量'
  137 + },
  138 + {
  139 + field: 'inventorySts',
  140 + title: '库存状态',
  141 + align: 'center',
  142 + formatter: function (value, row, index) {
  143 + return $.table.selectDictLabel(inventoryStatus, value);
  144 + }
  145 + },
  146 + {
  147 + field: 'taskQty',
  148 + title: '预定执行数量'
  149 + },
  150 + {
  151 + field: 'lockedQty',
  152 + title: '冻结数量'
  153 + },
  154 + {
  155 + field: 'companyCode',
  156 + title: '货主编码'
  157 + },
  158 + {
  159 + field: 'receiptCode',
  160 + title: '入库单编码'
  161 + },
  162 + {
  163 + field: 'receiptDetailId',
  164 + title: '入库单明细ID',
  165 + visible: true
  166 + },
  167 + {
  168 + field: 'batch',
  169 + title: '批次',
  170 + sortable: false,
  171 + visible: false
  172 + },
  173 + {
  174 + field: 'lot',
  175 + title: '批号',
  176 + sortable: false,
  177 + visible: false
  178 + },
  179 + {
  180 + field: 'projectNo',
  181 + title: '项目号',
  182 + sortable: true
  183 + },
  184 + {
  185 + field: 'supplierCode',
  186 + title: '供应商编码',
  187 + visible: true
  188 + },
  189 + {
  190 + field: 'manufactureDate',
  191 + title: '生产日期',
  192 + sortable: true,
  193 + visible: false
  194 + },
  195 + {
  196 + field: 'expirationDate',
  197 + title: '失效日期',
  198 + sortable: true,
  199 + visible: false
  200 + },
233 201
234 - {  
235 - field : 'costPrice',  
236 - title : '成本' ,  
237 - visible:false  
238 - },  
239 - {  
240 - field : 'listPrice',  
241 - title : '标价' ,  
242 - visible:false  
243 - },  
244 - {  
245 - field : 'netPrice',  
246 - title : '净价' ,  
247 - visible:false  
248 - },  
249 - {  
250 - field : 'created',  
251 - title : '入库时间',  
252 - sortable:true  
253 - },  
254 - {  
255 - field : 'createdBy',  
256 - title : '创建用户' ,  
257 - visible:false  
258 - },  
259 - {  
260 - field : 'lastUpdated',  
261 - title : '最后修改时间',  
262 - sortable:true  
263 - },  
264 - {  
265 - field : 'lastUpdatedBy',  
266 - title : '更新用户'  
267 - },  
268 - {  
269 - field : 'userDef1',  
270 - title : '自定义字段1' ,  
271 - visible:false  
272 - },  
273 - {  
274 - field : 'userDef2',  
275 - title : '自定义字段2' ,  
276 - visible:false  
277 - },  
278 - {  
279 - field : 'userDef3',  
280 - title : '自定义字段3' ,  
281 - visible:false  
282 - }  
283 - ] 202 + {
  203 + field: 'referCode',
  204 + title: '上游单号'
  205 + },
  206 + {
  207 + field: 'referDetailId',
  208 + title: '上游单号行号'
  209 + },
  210 + {
  211 + field: 'qcCheck',
  212 + title: '质检'
  213 + },
  214 + {
  215 + field: 'weight',
  216 + title: '重量'
  217 + },
  218 + {
  219 + field: 'attributeId',
  220 + title: '属性号',
  221 + visible: false
  222 + },
  223 + {
  224 + field: 'attribute1',
  225 + title: '属性1',
  226 + visible: false
  227 + },
  228 + {
  229 + field: 'attribute2',
  230 + title: '属性2',
  231 + visible: false
  232 + },
  233 + {
  234 + field: 'attribute3',
  235 + title: '属性3',
  236 + visible: false
  237 + },
  238 + {
  239 + field: 'lockCode',
  240 + title: '锁',
  241 + },
  242 + {
  243 + field: 'lastCycleCountDate',
  244 + title: '上次盘点日期',
  245 + visible: false,
  246 + sortable: true
  247 + },
  248 + {
  249 + field: 'created',
  250 + title: '入库日期',
  251 + sortable: true
  252 + },
  253 + {
  254 + field: 'createdBy',
  255 + title: '创建用户',
  256 + visible: false
  257 + },
  258 + {
  259 + field: 'lastUpdated',
  260 + title: '最后修改时间',
  261 + sortable: true
  262 + },
  263 + {
  264 + field: 'lastUpdatedBy',
  265 + title: '更新用户'
  266 + },
  267 + {
  268 + field: 'userDef1',
  269 + title: '自定义字段1',
  270 + visible: false
  271 + },
  272 + {
  273 + field: 'userDef2',
  274 + title: '自定义字段2',
  275 + visible: false
  276 + },
  277 + {
  278 + field: 'userDef3',
  279 + title: '自定义字段3',
  280 + visible: false
  281 + }
  282 + ]
284 }; 283 };
285 $.table.init(options); 284 $.table.init(options);
286 }); 285 });
src/main/resources/templates/admin/main.html
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 <p>库内物料品数</p> 59 <p>库内物料品数</p>
60 </div> 60 </div>
61 </div> 61 </div>
62 - <div class="col-sm-2" style="padding:5px;" onclick="createMenuItem('/twms/admin/task?id=40','任务查看')"> 62 + <div class="col-sm-2" style="padding:5px;" onclick="createMenuItem('/twms/admin/task?id=100','任务查看')">
63 <div class="total_box ys06"> 63 <div class="total_box ys06">
64 <h1 id="s6">-</h1> 64 <h1 id="s6">-</h1>
65 <p>待执行任务数</p> 65 <p>待执行任务数</p>
src/main/resources/templates/admin/receiptHeader/receiptHeader.html
@@ -33,45 +33,23 @@ @@ -33,45 +33,23 @@
33 入库单号:<input type="text" name="code"/> 33 入库单号:<input type="text" name="code"/>
34 </li> 34 </li>
35 <li> 35 <li>
36 - 仓库:<input type="text" name="warehouseCode"/>  
37 - </li>  
38 - <li>  
39 - <!--入库类型:<input type="text" name="sourceCode"/>-->  
40 - 入库类型:<select name="type" th:with="type=${@dict.getType('receiptType')}">  
41 - <option value="">所有</option>  
42 - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> 36 + 上游单号:<input type="text" name="referCode"/>
43 </li> 37 </li>
44 <li> 38 <li>
45 - 供 应 商:<input type="text" name="supplierCode"/> 39 + 仓库:<input type="text" name="warehouseCode"/>
46 </li> 40 </li>
47 <li> 41 <li>
48 - <!--头 状 态:<input type="text" name="firstStatus"/>-->  
49 - 头 状 态:<select name="firstStatus" th:with="firstStatus=${@dict.getType('receiptHeaderStatus')}">  
50 - <option value="">所有</option>  
51 - <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>  
52 - </li> 42 + 货主:<select id="companyCode" name="companyCode" th:with="list=${@companyService.getCode()}">
  43 + <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['code']}"></option>
  44 + </select>
53 <li> 45 <li>
54 - <!--尾 状 态:<input type="text" name="lastStatus"/>-->  
55 - 尾 状 态:<select name="lastStatus" th:with="lastStatus=${@dict.getType('receiptHeaderStatus')}"> 46 + <!--入库类型:<input type="text" name="sourceCode"/>-->
  47 + 入库类型:<select name="type" th:with="type=${@receiptTypeService.getType()}">
56 <option value="">所有</option> 48 <option value="">所有</option>
57 - <option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>  
58 - </li>  
59 - <li>  
60 - 上游单号:<input type="text" name="sourceCode"/> 49 + <option th:each="e : ${type}" th:text="${e['name']}" th:value="${e['code']}"></option></select>
61 </li> 50 </li>
62 <li> 51 <li>
63 - 上游平台:<input type="text" name="sourcePlatform"/>  
64 - </li>  
65 - <li class="time">  
66 - <label>创建时间: </label>  
67 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>  
68 - <span>-</span>  
69 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>  
70 - </li>  
71 - <li>  
72 - u8仓库:<select name="uWarehouseCode" th:with="warehouse=${@warehouse.selectList()}">  
73 - <option value="">所有</option>  
74 - <option th:each="e : ${warehouse}" th:text="${e['uWarehouseName']}" th:value="${e['uWarehouseCode']}"></option></select> 52 + 供 应 商:<input type="text" name="supplierCode"/>
75 </li> 53 </li>
76 <li> 54 <li>
77 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 55 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -106,8 +84,7 @@ @@ -106,8 +84,7 @@
106 <input type="text" name="receiptCompanyCode" id="receiptCompanyCode"> 84 <input type="text" name="receiptCompanyCode" id="receiptCompanyCode">
107 <input type="hidden" name="receiptCompanyId" id="receiptCompanyId"> 85 <input type="hidden" name="receiptCompanyId" id="receiptCompanyId">
108 </li> 86 </li>
109 - <li>上游系统单号:<input type="text" name="receiptSourceCode" id="receiptSourceCode"></li>  
110 - <li>上游平台:<input type="text" name="receiptSourcePlatform" id="receiptSourcePlatform"></li> 87 + <li>上游系统单号:<input type="text" name="receiptReferCode" id="receiptReferCode"></li>
111 <li>入库单类型:<input type="text" name="receiptType" id = "receiptType"></li> 88 <li>入库单类型:<input type="text" name="receiptType" id = "receiptType"></li>
112 <li>总数量:<input type="text" name="receiptTotalQty" id="receiptTotalQty"></li> 89 <li>总数量:<input type="text" name="receiptTotalQty" id="receiptTotalQty"></li>
113 <li>总行数:<input type="text" name="receiptTotalLines" id="receiptTotalLines"></li> 90 <li>总行数:<input type="text" name="receiptTotalLines" id="receiptTotalLines"></li>
@@ -136,7 +113,7 @@ @@ -136,7 +113,7 @@
136 <div class="tab-pane fade" id="tabOther"> 113 <div class="tab-pane fade" id="tabOther">
137 <div class="select-list"> 114 <div class="select-list">
138 <ul> 115 <ul>
139 - <li>备注:<input type="text" name="receiptRemark" id="receiptRemark"></li> 116 + <li>备注:<input type="text" name="receiptNote" id="receiptNote"></li>
140 <li>扩展属性1:<input type="text" name="receiptUserDef1" id="receiptUserDef1"></li> 117 <li>扩展属性1:<input type="text" name="receiptUserDef1" id="receiptUserDef1"></li>
141 <li>扩展属性2:<input type="text" name="receiptUserDef2" id="receiptUserDef2"></li> 118 <li>扩展属性2:<input type="text" name="receiptUserDef2" id="receiptUserDef2"></li>
142 <li>扩展属性3:<input type="text" name="receiptUserDef3" id="receiptUserDef3"></li> 119 <li>扩展属性3:<input type="text" name="receiptUserDef3" id="receiptUserDef3"></li>
@@ -177,7 +154,7 @@ @@ -177,7 +154,7 @@
177 var prefix = ctx + "admin/receiptHeader"; 154 var prefix = ctx + "admin/receiptHeader";
178 var detailPrefix = ctx + "admin/receiptDetail"; 155 var detailPrefix = ctx + "admin/receiptDetail";
179 var datas = [[${@dict.getType('sys_normal_disable')}]]; 156 var datas = [[${@dict.getType('sys_normal_disable')}]];
180 - var receiptTypes = [[${@dict.getType('receiptType')}]]; 157 + var receiptTypes = [[${@receiptTypeService.getType()}]];
181 var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]]; 158 var receiptHeaderStatus = [[${@dict.getType('receiptHeaderStatus')}]];
182 var uploadStatus = [[${@dict.getType('uploadStatus')}]]; 159 var uploadStatus = [[${@dict.getType('uploadStatus')}]];
183 var inventoryStatus = [[${@dict.getType('inventoryStatus')}]]; 160 var inventoryStatus = [[${@dict.getType('inventoryStatus')}]];
@@ -226,11 +203,6 @@ @@ -226,11 +203,6 @@
226 field : 'warehouseCode', 203 field : 'warehouseCode',
227 title : '仓库', 204 title : '仓库',
228 }, 205 },
229 - {  
230 - field : 'uWarehouseCode',  
231 - title : 'U8仓库',  
232 - sortable:true  
233 - },  
234 { 206 {
235 field : 'companyId', 207 field : 'companyId',
236 title : '货主ID', 208 title : '货主ID',
@@ -250,16 +222,11 @@ @@ -250,16 +222,11 @@
250 } 222 }
251 }, 223 },
252 { 224 {
253 - field : 'sourceCode', 225 + field : 'referCode',
254 title : '上游单号', 226 title : '上游单号',
255 sortable:true 227 sortable:true
256 }, 228 },
257 { 229 {
258 - field : 'sourcePlatform',  
259 - title : '上游平台',  
260 - visible:false  
261 - },  
262 - {  
263 field : 'supplierId', 230 field : 'supplierId',
264 title : '供应商id', 231 title : '供应商id',
265 visible:false 232 visible:false
@@ -297,18 +264,6 @@ @@ -297,18 +264,6 @@
297 visible:false 264 visible:false
298 }, 265 },
299 { 266 {
300 - field : 'uploadTime',  
301 - title : '上传时间',  
302 - visible:false,  
303 - sortable:true  
304 - },  
305 - {  
306 - field : 'appointmentTime',  
307 - title : '入库预约时间',  
308 - visible:false,  
309 - sortable:true  
310 - },  
311 - {  
312 field : 'firstStatus', 267 field : 'firstStatus',
313 title : '头状态', 268 title : '头状态',
314 align: 'center', 269 align: 'center',
@@ -343,14 +298,6 @@ @@ -343,14 +298,6 @@
343 title : '更新用户' 298 title : '更新用户'
344 }, 299 },
345 { 300 {
346 - field : 'enable',  
347 - title : '是否有效',  
348 - align: 'center',  
349 - formatter: function(value, row, index) {  
350 - return $.table.selectDictLabel(datas, value);  
351 - }  
352 - },  
353 - {  
354 field : 'userDef1', 301 field : 'userDef1',
355 title : '自定义字段1', 302 title : '自定义字段1',
356 visible: false 303 visible: false
@@ -418,81 +365,159 @@ @@ -418,81 +365,159 @@
418 title : '入库单号', 365 title : '入库单号',
419 visible:false 366 visible:false
420 }, 367 },
421 - {  
422 - field : 'zoneCode',  
423 - title : '库区编码'  
424 - },  
425 - {  
426 - field : 'materialCode',  
427 - title : '存货编码'  
428 - },  
429 - {  
430 - field : 'materialName',  
431 - title : '物料名称'  
432 - },  
433 - {  
434 - field : 'specification',  
435 - title : '规格'  
436 - },  
437 - {  
438 - field : 'batch',  
439 - title : '批次'  
440 - },  
441 - {  
442 - field : 'lot',  
443 - title : '批号'  
444 - },  
445 - {  
446 - field : 'project',  
447 - title : '项目号'  
448 - },  
449 - {  
450 - field : 'manufactureDate',  
451 - title : '生产日期'  
452 - },  
453 - {  
454 - field : 'expirationDate',  
455 - title : '失效日期'  
456 - },  
457 - {  
458 - field : 'inventoryStatus',  
459 - title : '库存状态',  
460 - formatter: function(value, row, index) {  
461 - return $.table.selectDictLabel(inventoryStatus, value);  
462 - },  
463 - },  
464 - {  
465 - field : 'qty',  
466 - title : '单据数量'  
467 - },  
468 - {  
469 - field : 'qtyCompleted',  
470 - title : '已收数量'  
471 - },  
472 - {  
473 - field : 'status',  
474 - title : '单据状态',  
475 - align: 'center',  
476 - formatter: function(value, row, index) {  
477 - return $.table.selectDictLabel(receiptHeaderStatus, value);  
478 - }  
479 - },  
480 - {  
481 - field : 'created',  
482 - title : '创建时间'  
483 - },  
484 - {  
485 - field : 'createdBy',  
486 - title : '创建用户'  
487 - },  
488 - {  
489 - field : 'lastUpdated',  
490 - title : '最后修改时间'  
491 - },  
492 - {  
493 - field : 'lastUpdatedBy',  
494 - title : '更新用户'  
495 - }, 368 + {
  369 + field : 'materialCode',
  370 + title : '物料编码'
  371 + },
  372 + {
  373 + field : 'materialName',
  374 + title : '物料名称'
  375 + },
  376 + {
  377 + field : 'materialSpec',
  378 + title : '物料规格'
  379 + },
  380 + {
  381 + field : 'materialUnit',
  382 + title : '物料单位'
  383 + },
  384 + {
  385 + field : 'supplierCode',
  386 + title : '供应商编码'
  387 + },
  388 + {
  389 + field : 'batch',
  390 + title : '批次'
  391 + },
  392 + {
  393 + field : 'lot',
  394 + title : '批号' ,
  395 + visible:false
  396 + },
  397 + {
  398 + field : 'qcCheck',
  399 + title : '是否质检',
  400 + align : "center",
  401 + formatter: function(value, row, index) {
  402 + var actions = [];
  403 + if (value == 0) {
  404 + actions.push("<span class='badge badge-info'>是</span>");
  405 + } else {
  406 + actions.push("<span class='badge badge-info'>否</span>");
  407 + }
  408 + return actions.join('');
  409 + }
  410 + },
  411 + {
  412 + field : 'projectNo',
  413 + title : '项目号'
  414 + },
  415 + {
  416 + field : 'manufactureDate',
  417 + title : '生产日期' ,
  418 + visible:false
  419 + },
  420 + {
  421 + field : 'expirationDate',
  422 + title : '失效日期' ,
  423 + visible:false
  424 + },
  425 + {
  426 + field : 'agingDate',
  427 + title : '入库日期' ,
  428 + visible:false
  429 + },
  430 + {
  431 + field : 'totalQty',
  432 + title : '总数量'
  433 + },
  434 + {
  435 + field : 'openQty',
  436 + title : '未收数量'
  437 + },
  438 + {
  439 + field : 'referCode',
  440 + title : 'ERP单号',
  441 + visible : false
  442 + },
  443 + {
  444 + field : 'referId',
  445 + title : 'ERP内部号',
  446 + visible : false
  447 + },
  448 + {
  449 + field : 'referLineNum',
  450 + title : 'ERP行号',
  451 + visible : false
  452 + },
  453 + {
  454 + field : 'locatingRule',
  455 + title : '定位规则'
  456 + },
  457 + {
  458 + field : 'inventorySts',
  459 + title : '库存状态',
  460 + visible : false
  461 + },
  462 + {
  463 + field : 'itemListPrice',
  464 + title : '标价'
  465 + },
  466 + {
  467 + field : 'itemNetPrice',
  468 + title : '净价'
  469 + },
  470 + {
  471 + field : 'price',
  472 + title : '单价' ,
  473 + visible:false
  474 + },
  475 + {
  476 + field : 'statusFlowCode',
  477 + title : '流程编码'
  478 + },
  479 + {
  480 + field : 'isVirtualBom',
  481 + title : '是否虚拟套件',
  482 + align : "center",
  483 + formatter: function(value, row, index) {
  484 + return $.table.selectDictLabel(isVirtualBoms, value);
  485 + }
  486 + },
  487 + {
  488 + field : 'created',
  489 + title : '创建时间'
  490 + },
  491 + {
  492 + field : 'createdBy',
  493 + title : '创建用户',
  494 + visible:false
  495 + },
  496 + {
  497 + field : 'lastUpdated',
  498 + title : '最后修改时间',
  499 + visible:false
  500 + },
  501 + {
  502 + field : 'lastUpdatedBy',
  503 + title : '更新用户' ,
  504 + visible:false
  505 + },
  506 + {
  507 + field : 'userDef1',
  508 + title : '自定义字段1' ,
  509 + visible:false
  510 + },
  511 + {
  512 + field : 'userDef2',
  513 + title : '自定义字段2' ,
  514 + visible:false
  515 + },
  516 + {
  517 + field : 'userDef3',
  518 + title : '自定义字段3' ,
  519 + visible:false
  520 + },
496 { 521 {
497 title: '操作', 522 title: '操作',
498 align: 'center', 523 align: 'center',
@@ -540,8 +565,7 @@ @@ -540,8 +565,7 @@
540 receiptCode=value.data.code 565 receiptCode=value.data.code
541 $('#receiptCompanyId').val(value.data.companyId); 566 $('#receiptCompanyId').val(value.data.companyId);
542 $('#receiptCompanyCode').val(value.data.companyCode); 567 $('#receiptCompanyCode').val(value.data.companyCode);
543 - $('#receiptSourceCode').val(value.data.sourceCode);  
544 - $('#receiptSourcePlatform').val(value.data.sourcePlatform); 568 + $('#receiptReferCode').val(value.data.referCode);
545 $('#receiptType').val(receiptTypes.filter(function (e) {return e.dictValue==value.data.type})[0].dictLabel); 569 $('#receiptType').val(receiptTypes.filter(function (e) {return e.dictValue==value.data.type})[0].dictLabel);
546 $('#receiptTotalQty').val(value.data.totalQty); 570 $('#receiptTotalQty').val(value.data.totalQty);
547 $('#receiptTotalLines').val(value.data.totalLines); 571 $('#receiptTotalLines').val(value.data.totalLines);
src/main/resources/templates/admin/shipmentHeader/shipmentHeader.html
@@ -27,17 +27,20 @@ @@ -27,17 +27,20 @@
27 出库单号:<input type="text" name="code"/> 27 出库单号:<input type="text" name="code"/>
28 </li> 28 </li>
29 <li> 29 <li>
30 - 仓库:<input type="text" name="warehouseCode"/>  
31 - </li>  
32 - <li>  
33 <!--入库类型:<input type="text" name="sourceCode"/>--> 30 <!--入库类型:<input type="text" name="sourceCode"/>-->
34 - 出库类型:<select name="type" th:with="type=${@dict.getType('shipmentType')}"> 31 + 出库类型:<select name="shipmentType" th:with="shipmentType=${@dict.getType('shipmentType')}">
35 <option value="">所有</option> 32 <option value="">所有</option>
36 - <option th:each="e : ${type}" th:text="${e['dictLabel']}" 33 + <option th:each="e : ${shipmentType}" th:text="${e['dictLabel']}"
37 th:value="${e['dictValue']}"></option> 34 th:value="${e['dictValue']}"></option>
38 </select> 35 </select>
39 </li> 36 </li>
40 <li> 37 <li>
  38 + 上游单号:<input type="text" name="referCode"/>
  39 + </li>
  40 + <li>
  41 + 上游订单类型:<input type="text" name="referCodeType"/>
  42 + </li>
  43 + <li>
41 客户编码:<input type="text" name="sourceCode"/> 44 客户编码:<input type="text" name="sourceCode"/>
42 </li> 45 </li>
43 <li> 46 <li>
@@ -58,24 +61,13 @@ @@ -58,24 +61,13 @@
58 th:value="${e['dictValue']}"></option> 61 th:value="${e['dictValue']}"></option>
59 </select> 62 </select>
60 </li> 63 </li>
61 - <li>  
62 - 上游单号:<input type="text" name="sourceCode"/>  
63 - </li>  
64 - <li>  
65 - u8仓库:<select name="uWarehouseCode" th:with="warehouse=${@warehouse.selectList()}">  
66 - <option value="">所有</option>  
67 - <option th:each="e : ${warehouse}" th:text="${e['uWarehouseName']}" th:value="${e['uWarehouseCode']}"></option></select>  
68 - </li>  
69 - <li>  
70 - 上游平台:<input type="text" name="sourcePlatform"/>  
71 - </li>  
72 <li class="time"> 64 <li class="time">
73 <label>创建时间: </label> 65 <label>创建时间: </label>
74 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 66 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
75 - name="params[createdBegin]"/> 67 + name="createdBegin"/>
76 <span>-</span> 68 <span>-</span>
77 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 69 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
78 - name="params[createdEnd]"/> 70 + name="createdEnd"/>
79 </li> 71 </li>
80 <li> 72 <li>
81 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i 73 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
@@ -110,8 +102,8 @@ @@ -110,8 +102,8 @@
110 <li>仓库编码:<input type="text" name="shipmentWarehouseCode" id="shipmentWarehouseCode"></li> 102 <li>仓库编码:<input type="text" name="shipmentWarehouseCode" id="shipmentWarehouseCode"></li>
111 <input type="hidden" name="shipmentCompanyId" id="shipmentCompanyId"> 103 <input type="hidden" name="shipmentCompanyId" id="shipmentCompanyId">
112 <li>货主:<input type="text" name="shipmentCompanyCode" id="shipmentCompanyCode"></li> 104 <li>货主:<input type="text" name="shipmentCompanyCode" id="shipmentCompanyCode"></li>
113 - <li>上游系统单号:<input type="text" name="shipmentSourceCode" id="shipmentSourceCode"></li>  
114 - <li>上游平台:<input type="text" name="shipmentSourcePlatform" id="shipmentSourcePlatform"></li> 105 + <li>上游订单号:<input type="text" name="shipmentSourceCode" id="shipmentSourceCode"></li>
  106 + <li>订单平台:<input type="text" name="shipmentSourcePlatform" id="shipmentSourcePlatform"></li>
115 <li>出库单类型:<input type="text" name="shipmentType" id = "shipmentType"></li> 107 <li>出库单类型:<input type="text" name="shipmentType" id = "shipmentType"></li>
116 <li>总数量:<input type="text" name="shipmentTotalQty" id="shipmentTotalQty"></li> 108 <li>总数量:<input type="text" name="shipmentTotalQty" id="shipmentTotalQty"></li>
117 <li>总行数:<input type="text" name="shipmentTotalLines" id="shipmentTotalLines"></li> 109 <li>总行数:<input type="text" name="shipmentTotalLines" id="shipmentTotalLines"></li>
@@ -123,16 +115,14 @@ @@ -123,16 +115,14 @@
123 <div class="tab-pane fade" id="tabCustomer"> 115 <div class="tab-pane fade" id="tabCustomer">
124 <div class="select-list"> 116 <div class="select-list">
125 <ul> 117 <ul>
126 - <li>客户编码:<input type="text" name="shipmentShipTo" id="shipmentShipTo"></li>  
127 - <li>发货预约时间:<input type="text" name="shipmentAppointmentTime" id="shipmentAppointmentTime"></li> 118 + <li>客户编码:<input type="text" name="shipmentShipTo" id="shipmentShipTo"></li>
128 </ul> 119 </ul>
129 </div> 120 </div>
130 </div> 121 </div>
131 <div class="tab-pane fade" id="tabExcute"> 122 <div class="tab-pane fade" id="tabExcute">
132 <div class="select-list"> 123 <div class="select-list">
133 <ul> 124 <ul>
134 - <li>优先级:<input type="text" name="shipmentPriority" id="shipmentPriority"></li>  
135 - <li>发货站台:<input type="text" name="shipmentStation" id="shipmentStation"></li> 125 + < <li>优先级:<input type="text" name="shipmentPriority" id="shipmentPriority"></li>
136 <li></li> 126 <li></li>
137 </ul> 127 </ul>
138 </div> 128 </div>
@@ -140,7 +130,6 @@ @@ -140,7 +130,6 @@
140 <div class="tab-pane fade" id="tabOther"> 130 <div class="tab-pane fade" id="tabOther">
141 <div class="select-list"> 131 <div class="select-list">
142 <ul> 132 <ul>
143 - <li>备注:<input type="text" name="shipmentRemark" id="shipmentRemark"></li>  
144 <li>扩展属性1:<input type="text" name="shipmentUserDef1" id="shipmentUserDef1"></li> 133 <li>扩展属性1:<input type="text" name="shipmentUserDef1" id="shipmentUserDef1"></li>
145 <li>扩展属性2:<input type="text" name="shipmentUserDef2" id="shipmentUserDef2"></li> 134 <li>扩展属性2:<input type="text" name="shipmentUserDef2" id="shipmentUserDef2"></li>
146 <li>扩展属性3:<input type="text" name="shipmentUserDef3" id="shipmentUserDef3"></li> 135 <li>扩展属性3:<input type="text" name="shipmentUserDef3" id="shipmentUserDef3"></li>
@@ -151,14 +140,10 @@ @@ -151,14 +140,10 @@
151 <div class="tab-pane fade" id="tabSystem"> 140 <div class="tab-pane fade" id="tabSystem">
152 <div class="select-list"> 141 <div class="select-list">
153 <ul> 142 <ul>
154 - <li>上传备注:<input type="text" name="shipmentUploadremark" id="shipmentUploadremark"></li>  
155 - <li>上传时间:<input type="text" name="shipmentUploadTime" id="shipmentUploadTime"></li>  
156 - <li>上传状态:<input type="text" name="shipmentUploadStatus" id="shipmentUploadStatus"></li>  
157 <li>创建时间:<input type="text" name="shipmentCreated" id="shipmentCreated"></li> 143 <li>创建时间:<input type="text" name="shipmentCreated" id="shipmentCreated"></li>
158 <li>创建用户:<input type="text" name="shipmentCreatedBy" id="shipmentCreatedBy"></li> 144 <li>创建用户:<input type="text" name="shipmentCreatedBy" id="shipmentCreatedBy"></li>
159 <li>最后修改时间:<input type="text" name="shipmentLastUpdated" id="shipmentLastUpdated"></li> 145 <li>最后修改时间:<input type="text" name="shipmentLastUpdated" id="shipmentLastUpdated"></li>
160 <li>更新用户:<input type="text" name=" shipmentLastUpdatedBy" id="shipmentLastUpdatedBy"></li> 146 <li>更新用户:<input type="text" name=" shipmentLastUpdatedBy" id="shipmentLastUpdatedBy"></li>
161 - <li>是否有效:<input type="text" name="shipmentEnable" id="shipmentEnable"></li>  
162 <li>是否删除:<input type="text" name="shipmentDeleted" id="shipmentDeleted"></li> 147 <li>是否删除:<input type="text" name="shipmentDeleted" id="shipmentDeleted"></li>
163 </ul> 148 </ul>
164 </div> 149 </div>
@@ -229,38 +214,23 @@ @@ -229,38 +214,23 @@
229 sortable:true 214 sortable:true
230 }, 215 },
231 { 216 {
232 - field: 'warehouseCode',  
233 - title: '仓库',  
234 - sortable:true  
235 - },  
236 - {  
237 - field: 'companyId',  
238 - title: '货主标识',  
239 - visible:false  
240 - },  
241 - {  
242 field: 'companyCode', 217 field: 'companyCode',
243 title: '货主', 218 title: '货主',
244 sortable:true 219 sortable:true
245 }, 220 },
246 { 221 {
247 - field: 'sourceCode',  
248 - title: '上游单号', 222 + field: 'referCode',
  223 + title: '上游订单号',
249 sortable:true 224 sortable:true
250 }, 225 },
251 { 226 {
252 - field: 'sourcePlatform',  
253 - title: '上游平台', 227 + field: 'referCodeType',
  228 + title: '上游订单内部号',
254 sortable:true, 229 sortable:true,
255 visible:false 230 visible:false
256 }, 231 },
257 { 232 {
258 - field : 'uWarehouseCode',  
259 - title : 'U8仓库',  
260 - sortable:true  
261 - },  
262 - {  
263 - field: 'type', 233 + field: 'shipmentType',
264 title: '类型', 234 title: '类型',
265 align: 'center', 235 align: 'center',
266 formatter: function(value, row, index) { 236 formatter: function(value, row, index) {
@@ -270,7 +240,7 @@ @@ -270,7 +240,7 @@
270 240
271 }, 241 },
272 { 242 {
273 - field: 'shipTo', 243 + field: 'customerCode',
274 title: '客户编码', 244 title: '客户编码',
275 sortable:true 245 sortable:true
276 }, 246 },
@@ -279,12 +249,8 @@ @@ -279,12 +249,8 @@
279 title: '优先级' 249 title: '优先级'
280 }, 250 },
281 { 251 {
282 - field: 'station',  
283 - title: '发货站台',  
284 - align: 'center',  
285 - formatter: function(value, row, index) {  
286 - return $.table.selectDictLabel(stations, value);  
287 - }, 252 + field: 'route',
  253 + title: '路线',
288 sortable:true 254 sortable:true
289 }, 255 },
290 { 256 {
@@ -296,25 +262,6 @@ @@ -296,25 +262,6 @@
296 title: '总行数' 262 title: '总行数'
297 }, 263 },
298 { 264 {
299 - field: 'remark',  
300 - title: '备注'  
301 - },  
302 - {  
303 - field: 'uploadremark',  
304 - title: '上传备注',  
305 - visible:false  
306 - },  
307 - {  
308 - field: 'uploadTime',  
309 - title: '上传时间',  
310 - visible:false  
311 - },  
312 - {  
313 - field: 'appointmentTime',  
314 - title: '发货预约时间',  
315 - visible:false  
316 - },  
317 - {  
318 field: 'firstStatus', 265 field: 'firstStatus',
319 title: '头状态', 266 title: '头状态',
320 formatter: function(value, row, index) { 267 formatter: function(value, row, index) {
@@ -331,11 +278,6 @@ @@ -331,11 +278,6 @@
331 sortable:true 278 sortable:true
332 }, 279 },
333 { 280 {
334 - field: 'uploadStatus',  
335 - title: '上传状态',  
336 - visible:false  
337 - },  
338 - {  
339 field: 'created', 281 field: 'created',
340 title: '创建时间', 282 title: '创建时间',
341 sortable: true 283 sortable: true
@@ -355,13 +297,6 @@ @@ -355,13 +297,6 @@
355 visible:false 297 visible:false
356 }, 298 },
357 { 299 {
358 - field: 'enable',  
359 - title: '是否有效',  
360 - formatter: function(value, row, index) {  
361 - return $.table.selectDictLabel(datas, value);  
362 - }  
363 - },  
364 - {  
365 title: '操作', 300 title: '操作',
366 align: 'center', 301 align: 'center',
367 formatter: function (value, row, index) { 302 formatter: function (value, row, index) {
@@ -396,15 +331,6 @@ @@ -396,15 +331,6 @@
396 title: '明细id' 331 title: '明细id'
397 }, 332 },
398 { 333 {
399 - field: 'zoneCode',  
400 - title: '库区'  
401 - },  
402 -  
403 - /* {  
404 - field: 'shipmentId',  
405 - title: '出库单Id'  
406 - },*/  
407 - {  
408 field: 'materialCode', 334 field: 'materialCode',
409 title: '存货编码' 335 title: '存货编码'
410 }, 336 },
@@ -413,12 +339,13 @@ @@ -413,12 +339,13 @@
413 title: '物料名称' 339 title: '物料名称'
414 }, 340 },
415 { 341 {
416 - field: 'specification', 342 + field: 'materialSpec',
417 title: '物料规格' 343 title: '物料规格'
418 }, 344 },
419 { 345 {
420 field: 'batch', 346 field: 'batch',
421 - title: '批次' 347 + title: '批次',
  348 + visible:false
422 }, 349 },
423 { 350 {
424 field: 'lot', 351 field: 'lot',
@@ -426,17 +353,17 @@ @@ -426,17 +353,17 @@
426 visible:false 353 visible:false
427 }, 354 },
428 { 355 {
429 - field: 'project', 356 + field: 'projectNo',
430 title: '项目号' 357 title: '项目号'
431 }, 358 },
432 - { 359 + /*{
433 field: 'status', 360 field: 'status',
434 title: '明细状态', 361 title: '明细状态',
435 formatter: function(value, row, index) { 362 formatter: function(value, row, index) {
436 return $.table.selectDictLabel(shipmentHeaderStatus, value); 363 return $.table.selectDictLabel(shipmentHeaderStatus, value);
437 }, 364 },
438 visible:true 365 visible:true
439 - }, 366 + },*/
440 { 367 {
441 field: 'manufactureDate', 368 field: 'manufactureDate',
442 title: '生产日期', 369 title: '生产日期',
@@ -450,37 +377,40 @@ @@ -450,37 +377,40 @@
450 { 377 {
451 field: 'agingDate', 378 field: 'agingDate',
452 title: '入库日期', 379 title: '入库日期',
453 - sortable: true 380 + visible:false
454 }, 381 },
455 { 382 {
456 - field: 'inventoryStatus', 383 + field: 'inventorySts',
457 title: '库存状态', 384 title: '库存状态',
458 formatter: function(value, row, index) { 385 formatter: function(value, row, index) {
459 return $.table.selectDictLabel(inventoryStatus, value); 386 return $.table.selectDictLabel(inventoryStatus, value);
460 }, 387 },
461 }, 388 },
462 { 389 {
463 - field: 'qty', 390 + field: 'shipQty',
464 title: '发货数量' 391 title: '发货数量'
465 }, 392 },
466 { 393 {
467 - field: 'qtyCompleted', 394 + field: 'requestQty',
468 title: '已出数量' 395 title: '已出数量'
469 }, 396 },
470 { 397 {
  398 + field : 'inventoryQty',
  399 + title : '库存数量'
  400 + },
  401 + {
  402 + field : 'materialUnit',
  403 + title : '物料单位'
  404 + },
  405 + {
471 field : 'status', 406 field : 'status',
472 - title : '单据状态', 407 + title : '明细状态',
473 align: 'center', 408 align: 'center',
474 formatter: function(value, row, index) { 409 formatter: function(value, row, index) {
475 return $.table.selectDictLabel(shipmentHeaderStatus, value); 410 return $.table.selectDictLabel(shipmentHeaderStatus, value);
476 } 411 }
477 }, 412 },
478 { 413 {
479 - field: 'price',  
480 - title: '物料单价',  
481 - visible:false  
482 - },  
483 - {  
484 field: 'created', 414 field: 'created',
485 title: '创建时间', 415 title: '创建时间',
486 }, 416 },
@@ -541,36 +471,21 @@ @@ -541,36 +471,21 @@
541 success:function (value) { 471 success:function (value) {
542 $('#shipmentId').val(value.data.id); 472 $('#shipmentId').val(value.data.id);
543 $('#shipmentCode').val(value.data.code); 473 $('#shipmentCode').val(value.data.code);
544 - $('#shipmentWarehouseId').val(value.data.warehouseId);  
545 $('#shipmentWarehouseCode').val(value.data.warehouseCode); 474 $('#shipmentWarehouseCode').val(value.data.warehouseCode);
546 - $('#shipmentCompanyId').val(value.data.companyId);  
547 $('#shipmentCompanyCode').val(value.data.companyCode); 475 $('#shipmentCompanyCode').val(value.data.companyCode);
548 - $('#shipmentSourceCode').val(value.data.sourceCode);  
549 - $('#shipmentSourcePlatform').val(value.data.sourcePlatform);  
550 - $('#shipmentType').val(shipmentTypes.filter(function(a){return a.dictValue==value.data.type})[0].dictLabel);  
551 - $('#shipmentShipTo').val(value.data.shipTo); 476 + $('#shipmentSourceCode').val(value.data.referCode);
  477 + $('#shipmentSourcePlatform').val(value.data.referPlatform);
  478 + $('#shipmentType').val(shipmentTypes.filter(function(a){return a.dictValue==value.data.shipmentType})[0].dictLabel);
  479 + $('#shipmentShipTo').val(value.data.customerCode);
552 $('#shipmentPriority').val(value.data.priority); 480 $('#shipmentPriority').val(value.data.priority);
553 - $('#shipmentStation').val(value.data.station);  
554 $('#shipmentTotalQty').val(value.data.totalQty); 481 $('#shipmentTotalQty').val(value.data.totalQty);
555 $('#shipmentTotalLines').val(value.data.totalLines); 482 $('#shipmentTotalLines').val(value.data.totalLines);
556 - $('#shipmentRemark').val(value.data.remark);  
557 - $('#shipmentUploadremark').val(value.data.uploadremark);  
558 - $('#shipmentUploadTime').val(value.data.uploadTime);  
559 - $('#shipmentAppointmentTime').val(value.data.appointmentTime);  
560 $('#shipmentFirstStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.firstStatus})[0].dictLabel); 483 $('#shipmentFirstStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.firstStatus})[0].dictLabel);
561 $('#shipmentLastStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.lastStatus})[0].dictLabel); 484 $('#shipmentLastStatus').val(shipmentHeaderStatus.filter(function(a){return a.dictValue==value.data.lastStatus})[0].dictLabel);
562 - $('#shipmentUploadStatus').val(uploadStatus.filter(function (a) {return a.dictValue==value.data.uploadStatus})[0].dictLabel);  
563 $('#shipmentCreated').val(value.data.created); 485 $('#shipmentCreated').val(value.data.created);
564 $('#shipmentCreatedBy').val(value.data.createdBy); 486 $('#shipmentCreatedBy').val(value.data.createdBy);
565 $('#shipmentLastUpdated').val(value.data.lastUpdated); 487 $('#shipmentLastUpdated').val(value.data.lastUpdated);
566 $('#shipmentLastUpdatedBy').val(value.data.lastUpdatedBy); 488 $('#shipmentLastUpdatedBy').val(value.data.lastUpdatedBy);
567 - //$('#shipmentEnable').val(value.data.enable);  
568 - if(value.data.enable==true){  
569 - $('#shipmentEnable').val('是')  
570 - }else{  
571 - $('#shipmentEnable').val('否')  
572 - };  
573 - //$('#shipmentDeleted').val(value.data.deleted);  
574 if(value.data.deleted==false){ 489 if(value.data.deleted==false){
575 $('#shipmentDeleted').val('否') 490 $('#shipmentDeleted').val('否')
576 }else{ 491 }else{
src/main/resources/templates/admin/task/task.html
@@ -27,56 +27,15 @@ @@ -27,56 +27,15 @@
27 <li> 27 <li>
28 任务id:<input type="text" name="id"/> 28 任务id:<input type="text" name="id"/>
29 </li> 29 </li>
30 - <!--<li>-->  
31 - <!--单据编码:<input type="text" name="billCode"/>-->  
32 - <!--</li>-->  
33 <li> 30 <li>
34 容器编号:<input type="text" name="containerCode"/> 31 容器编号:<input type="text" name="containerCode"/>
35 </li> 32 </li>
36 <li> 33 <li>
37 - <!--入库类型:<input type="text" name="sourceCode"/>-->  
38 - 任务类型:<select name="type" th:with="type=${@dict.getType('taskType')}">  
39 - <option value="">所有</option>  
40 - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> 34 + 源库位编号:<input type="text" name="fromLocation"/>
41 </li> 35 </li>
42 -  
43 - <li class="time" style="height: 30px">  
44 - <label>创建时间: </label>  
45 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>  
46 - <span>-</span>  
47 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>  
48 - </li>  
49 -  
50 - <li>  
51 - <!--头 状 态:<input type="text" name="firstStatus"/>-->  
52 - 头 状 态:<select name="firstStatus" th:with="firstStatus=${@dict.getType('taskStatus')}">  
53 - <option value="">所有</option>  
54 - <option th:each="e : ${firstStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>  
55 - </li>  
56 - <li>  
57 - <!--尾 状 态:<input type="text" name="lastStatus"/>-->  
58 - 尾 状 态:<select name="lastStatus" th:with="lastStatus=${@dict.getType('taskStatus')}">  
59 - <option value="">所有</option>  
60 - <option th:each="e : ${lastStatus}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>  
61 - </li>  
62 - <!--<li>  
63 - 出入库站台:<select name="station" th:with="stations = ${@dict.getType('station')}">  
64 - <option value="">所有</option>  
65 - <option th:each="e : ${stations}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select>  
66 - </li>-->  
67 <li> 36 <li>
68 - 巷道:<input type="text" name="roadway"/> 37 + 目的库位编号:<input type="text" name="toLocation"/>
69 </li> 38 </li>
70 - <li>  
71 - 库区:<input type="text" name="zoneCode"/>  
72 - </li>  
73 - <li>  
74 - 来源库位:<input type="text" name="sourceLocation"/>  
75 - </li>  
76 - <li>  
77 - 目的库位:<input type="text" name="destinationLocation"/>  
78 - </li>  
79 -  
80 <li> 39 <li>
81 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 40 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
82 <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i>&nbsp;导出</a>--> 41 <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
@@ -136,128 +95,90 @@ @@ -136,128 +95,90 @@
136 columns: [{ 95 columns: [{
137 checkbox: true 96 checkbox: true
138 }, 97 },
139 - {  
140 - field : 'id',  
141 - title : '任务id' ,  
142 - sortable: true  
143 - },  
144 - {  
145 - field : 'companyId',  
146 - title : '货主id' ,  
147 - visible:false  
148 - },  
149 - /*{  
150 - field : 'billCode',  
151 - title : '单据编码' ,  
152 - },*/  
153 - {  
154 - field : 'priority',  
155 - title : '优先级'  
156 - },  
157 - {  
158 - field : 'type',  
159 - title : '任务类型' ,  
160 - align: 'center',  
161 - visible:true,  
162 - formatter: function(value, row, index) {  
163 - return $.table.selectDictLabel(taskTypes, value);  
164 - } 98 + {
  99 + field : 'id',
  100 + title : '任务id' ,
  101 + sortable: true
  102 + },
  103 + {
  104 + field : 'companyCode',
  105 + title : '货主编码',
  106 + visible:true
  107 + },
  108 + {
  109 + field : 'taskType',
  110 + title : '任务类型' ,
  111 + align: 'center',
  112 + visible:true,
  113 + formatter: function(value, row, index) {
  114 + return $.table.selectDictLabel(taskTypes, value);
  115 + }
165 116
166 - },  
167 - {  
168 - field : 'roadway',  
169 - title : '巷道',  
170 - visible:true  
171 - },  
172 - {  
173 - field : 'station',  
174 - title : '出入库站台' ,  
175 - align: 'center',  
176 - visible:true,  
177 - formatter: function(value, row, index) {  
178 - return $.table.selectDictLabel(stations, value);  
179 - },  
180 - visible:false  
181 - },  
182 - {  
183 - field : 'containerCode',  
184 - title : '容器编码' ,  
185 - sortable: true  
186 - },  
187 - {  
188 - field : 'sourceLocation',  
189 - title : '来源库位',  
190 - sortable: true  
191 - },  
192 - {  
193 - field : 'zoneCode',  
194 - title : '库区',  
195 - sortable: true  
196 - },  
197 - {  
198 - field : 'destinationLocation',  
199 - title : '目的库位' ,  
200 - sortable: true  
201 - },  
202 - {  
203 - field : 'firstStatus',  
204 - title : '头状态' ,  
205 - align: 'center',  
206 - formatter: function(value, row, index) {  
207 - return $.table.selectDictLabel(taskStatus, value);  
208 - }  
209 - },  
210 - {  
211 - field : 'lastStatus',  
212 - title : '尾状态' ,  
213 - align: 'center',  
214 - formatter: function(value, row, index) {  
215 - return $.table.selectDictLabel(taskStatus, value);  
216 - }  
217 - },  
218 - {  
219 - field : 'created',  
220 - title : '生成时间',  
221 - sortable: true  
222 - },  
223 - {  
224 - field : 'createdBy',  
225 - title : '任务下达人'  
226 - },  
227 - {  
228 - field : 'beginTime',  
229 - title : '任务下达时间' ,  
230 - visible:false  
231 - },  
232 - {  
233 - field : 'lastUpdated',  
234 - title : '修改时间' ,  
235 - sortable: true,  
236 - },  
237 - {  
238 - field : 'endTime',  
239 - title : '任务完成时间',  
240 - sortable: true  
241 - },  
242 - {  
243 - field : 'lastUpdatedBy',  
244 - title : '更新用户'  
245 - },  
246 - {  
247 - field : 'userDef1',  
248 - title : '自定义字段1' ,  
249 - visible:false  
250 - },  
251 - {  
252 - field : 'userDef2',  
253 - title : '自定义字段2' ,  
254 - visible:false  
255 - },  
256 - {  
257 - field : 'userDef3',  
258 - title : '自定义字段3' ,  
259 - visible:false  
260 - }, 117 + },
  118 + {
  119 + field : 'fromLocation',
  120 + title : '源库位号',
  121 + visible:true
  122 + },
  123 +
  124 + {
  125 + field : 'toLocation',
  126 + title : '目的库位号',
  127 + visible:true
  128 + },
  129 + {
  130 + field : 'containerCode',
  131 + title : '容器号' ,
  132 + sortable: true
  133 + },
  134 + {
  135 + field : 'exceptionCode',
  136 + title : '异常原因',
  137 + sortable: true
  138 + },
  139 +
  140 + {
  141 + field : 'startPickDateTime',
  142 + title : '开始拣货时间',
  143 + sortable: true
  144 + },
  145 + {
  146 + field : 'endPickDateTime',
  147 + title : '截止拣货时间'
  148 + },
  149 + {
  150 + field : 'created',
  151 + title : '生成时间',
  152 + sortable: true
  153 + },
  154 + {
  155 + field : 'createdBy',
  156 + title : '任务下达人'
  157 + },
  158 + {
  159 + field : 'lastUpdated',
  160 + title : '修改时间' ,
  161 + sortable: true,
  162 + },
  163 + {
  164 + field : 'lastUpdatedBy',
  165 + title : '更新用户'
  166 + },
  167 + {
  168 + field : 'userDef1',
  169 + title : '自定义字段1' ,
  170 + visible:false
  171 + },
  172 + {
  173 + field : 'userDef2',
  174 + title : '自定义字段2' ,
  175 + visible:false
  176 + },
  177 + {
  178 + field : 'userDef3',
  179 + title : '自定义字段3' ,
  180 + visible:false
  181 + },
261 { 182 {
262 title: '操作', 183 title: '操作',
263 align: 'center', 184 align: 'center',
@@ -296,81 +217,81 @@ @@ -296,81 +217,81 @@
296 columns: [{ 217 columns: [{
297 checkbox: true 218 checkbox: true
298 }, 219 },
299 - {  
300 - field : 'id',  
301 - title : '明细Id'  
302 - },  
303 - {  
304 - field : 'taskId',  
305 - title : '任务Id',  
306 - sortable: true  
307 - },  
308 - {  
309 - field : 'billCode',  
310 - title : '单据编码',  
311 - },  
312 - {  
313 - field : 'allocationId',  
314 - title : '容器物料表ID' ,  
315 - sortable: true  
316 - },  
317 - {  
318 - field : 'materialCode',  
319 - title : '存货编码',  
320 - sortable: true  
321 - },  
322 - {  
323 - field : 'materialName',  
324 - title : '物料名称',  
325 - sortable:true  
326 - },  
327 - {  
328 - field : 'project',  
329 - title : '项目号',  
330 - },  
331 - {  
332 - field : 'containerCode',  
333 - title : '容器编码',  
334 - sortable:true  
335 - },  
336 - {  
337 - field : 'sourceLocation',  
338 - title : '源库位',  
339 - sortable:true  
340 - },  
341 - {  
342 - field : 'destinationLocation',  
343 - title : '目的库位',  
344 - sortable:true  
345 - },  
346 - {  
347 - field : 'qty',  
348 - title : '数量'  
349 - },  
350 - {  
351 - field : 'status',  
352 - title : '子任务状态',  
353 - align: 'center',  
354 - formatter: function(value, row, index) {  
355 - return $.table.selectDictLabel(taskDetailStatus, value);  
356 - }  
357 - },  
358 - {  
359 - field : 'endTime',  
360 - title : '子任务完成时间' ,  
361 - visible:false,  
362 - sortable:true  
363 - },  
364 - {  
365 - field : 'lastUpdated',  
366 - title : '最后修改时间' ,  
367 - visible:false,  
368 - sortable:true  
369 - },  
370 - {  
371 - field : 'lastUpdatedBy',  
372 - title : '更新用户'  
373 - }, 220 + {
  221 + field : 'id',
  222 + title : '明细id'
  223 + },
  224 + {
  225 + field : 'billCode',
  226 + title : '单据编码',
  227 + },
  228 + {
  229 + field : 'taskId',
  230 + title : '任务标识',
  231 + sortable: true
  232 + },
  233 + {
  234 + field : 'allocationId',
  235 + title : '容器物料表id' ,
  236 + sortable: true
  237 + },
  238 + {
  239 + field : 'materialCode',
  240 + title : '存货编码',
  241 + sortable: true
  242 + },
  243 + {
  244 + field : 'materialName',
  245 + title : '物料名称',
  246 + sortable:true
  247 + },
  248 + {
  249 + field : 'containerCode',
  250 + title : '容器编码',
  251 + sortable:true
  252 + },
  253 + {
  254 + field : 'fromLocation',
  255 + title : '源库位',
  256 + sortable:true
  257 + },
  258 + {
  259 + field : 'toLocation',
  260 + title : '目的库位',
  261 + sortable:true
  262 + },
  263 + {
  264 + field : 'qty',
  265 + title : '数量'
  266 + },
  267 + {
  268 + field : 'project',
  269 + title : '项目号'
  270 + },
  271 + {
  272 + field : 'status',
  273 + title : '子任务状态',
  274 + align: 'center',
  275 + formatter: function(value, row, index) {
  276 + return $.table.selectDictLabel(taskDetailStatus, value);
  277 + }
  278 + },
  279 + {
  280 + field : 'endTime',
  281 + title : '子任务完成时间' ,
  282 + visible:false,
  283 + sortable:true
  284 + },
  285 + {
  286 + field : 'lastUpdated',
  287 + title : '最后修改时间' ,
  288 + visible:false,
  289 + sortable:true
  290 + },
  291 + {
  292 + field : 'lastUpdatedBy',
  293 + title : '更新用户'
  294 + },
374 /*{ 295 /*{
375 title: '操作', 296 title: '操作',
376 align: 'center', 297 align: 'center',
src/main/resources/templates/administration/alarmFlow/alarmFlow.html
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 <!--</li>--> 23 <!--</li>-->
24 <li class="time"> 24 <li class="time">
25 <label>创建时间: </label> 25 <label>创建时间: </label>
26 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 26 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
27 <span>-</span> 27 <span>-</span>
28 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 28 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
29 </li> 29 </li>
30 <li> 30 <li>
31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/administration/alarmType/alarmType.html
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 <!--</li>--> 23 <!--</li>-->
24 <li class="time"> 24 <li class="time">
25 <label>创建时间: </label> 25 <label>创建时间: </label>
26 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 26 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
27 <span>-</span> 27 <span>-</span>
28 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 28 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
29 </li> 29 </li>
30 <li> 30 <li>
31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/administration/sendMail/sendMail.html
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 <!--</li>--> 23 <!--</li>-->
24 <li class="time"> 24 <li class="time">
25 <label>创建时间: </label> 25 <label>创建时间: </label>
26 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 26 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
27 <span>-</span> 27 <span>-</span>
28 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 28 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
29 </li> 29 </li>
30 <li> 30 <li>
31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 31 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/check/checkHeader/checkHeader.html
@@ -32,9 +32,9 @@ @@ -32,9 +32,9 @@
32 </li> 32 </li>
33 <li class="time"> 33 <li class="time">
34 <label>创建时间: </label> 34 <label>创建时间: </label>
35 - <input type="text" class="time-input" id="startCreatedTime" placeholder="开始时间" name="params[createdBegin]"/> 35 + <input type="text" class="time-input" id="startCreatedTime" placeholder="开始时间" name="createdBegin"/>
36 <span>-</span> 36 <span>-</span>
37 - <input type="text" class="time-input" id="endCreatedTime" placeholder="结束时间" name="params[createdEnd]"/> 37 + <input type="text" class="time-input" id="endCreatedTime" placeholder="结束时间" name="createdEnd"/>
38 </li> 38 </li>
39 <li> 39 <li>
40 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 40 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/check/checkingRegister/checkingRegister.html
@@ -32,9 +32,9 @@ @@ -32,9 +32,9 @@
32 </li> 32 </li>
33 <li class="time"> 33 <li class="time">
34 <label>创建时间: </label> 34 <label>创建时间: </label>
35 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 35 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
36 <span>-</span> 36 <span>-</span>
37 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 37 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
38 </li> 38 </li>
39 <li> 39 <li>
40 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 40 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/config/bomHeader/bomHeader.html
@@ -26,10 +26,10 @@ @@ -26,10 +26,10 @@
26 <li class="time"> 26 <li class="time">
27 <label>创建时间: </label> 27 <label>创建时间: </label>
28 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 28 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
29 - name="params[createdBegin]"/> 29 + name="createdBegin"/>
30 <span>-</span> 30 <span>-</span>
31 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 31 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
32 - name="params[createdEnd]"/> 32 + name="createdEnd"/>
33 </li> 33 </li>
34 <li> 34 <li>
35 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i 35 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
src/main/resources/templates/config/configWarning/configWarning.html
@@ -30,9 +30,9 @@ @@ -30,9 +30,9 @@
30 </li> 30 </li>
31 <li class="time"> 31 <li class="time">
32 <label>创建时间: </label> 32 <label>创建时间: </label>
33 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 33 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
34 <span>-</span> 34 <span>-</span>
35 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 35 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
36 </li> 36 </li>
37 <li> 37 <li>
38 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 38 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/config/container/container.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>
src/main/resources/templates/config/location/location.html
@@ -50,9 +50,9 @@ @@ -50,9 +50,9 @@
50 </li> 50 </li>
51 <li class="time"> 51 <li class="time">
52 <label>创建时间: </label> 52 <label>创建时间: </label>
53 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 53 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
54 <span>-</span> 54 <span>-</span>
55 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 55 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
56 </li> 56 </li>
57 <li> 57 <li>
58 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 58 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/config/station/station.html
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 </li> 14 </li>
15 <li class="time"> 15 <li class="time">
16 <label>创建时间: </label> 16 <label>创建时间: </label>
17 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 17 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
18 <span>-</span> 18 <span>-</span>
19 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 19 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
20 </li> 20 </li>
21 <li> 21 <li>
22 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 22 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
@@ -65,10 +65,10 @@ @@ -65,10 +65,10 @@
65 <li class="time"> 65 <li class="time">
66 <label>创建时间: </label> 66 <label>创建时间: </label>
67 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 67 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
68 - name="params[createdBegin]"/> 68 + name="createdBegin"/>
69 <span>-</span> 69 <span>-</span>
70 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 70 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
71 - name="params[createdEnd]"/> 71 + name="createdEnd"/>
72 </li> 72 </li>
73 <li> 73 <li>
74 创建人:<input id="createdBy" type="text" name="createdBy" /> 74 创建人:<input id="createdBy" type="text" name="createdBy" />
src/main/resources/templates/inventory/cycleCountHeader/cycleCountHeader.html
@@ -55,10 +55,10 @@ @@ -55,10 +55,10 @@
55 <li class="time"> 55 <li class="time">
56 <label>创建时间: </label> 56 <label>创建时间: </label>
57 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 57 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
58 - name="params[createdBegin]"/> 58 + name="createdBegin"/>
59 <span>-</span> 59 <span>-</span>
60 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 60 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
61 - name="params[createdEnd]"/> 61 + name="createdEnd"/>
62 </li> 62 </li>
63 <li> 63 <li>
64 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i 64 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
@@ -67,10 +67,10 @@ @@ -67,10 +67,10 @@
67 <li class="time" style="height:30px"> 67 <li class="time" style="height:30px">
68 <label>创建时间: </label> 68 <label>创建时间: </label>
69 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 69 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
70 - name="params[createdBegin]"/> 70 + name="createdBegin"/>
71 <span>-</span> 71 <span>-</span>
72 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 72 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
73 - name="params[createdEnd]"/> 73 + name="createdEnd"/>
74 </li> 74 </li>
75 <li> 75 <li>
76 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i 76 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
@@ -39,10 +39,10 @@ @@ -39,10 +39,10 @@
39 <li class="time"> 39 <li class="time">
40 <label>创建时间: </label> 40 <label>创建时间: </label>
41 <input type="text" class="time-input" id="startTime" placeholder="开始时间" 41 <input type="text" class="time-input" id="startTime" placeholder="开始时间"
42 - name="params[createdBegin]"/> 42 + name="createdBegin"/>
43 <span>-</span> 43 <span>-</span>
44 <input type="text" class="time-input" id="endTime" placeholder="结束时间" 44 <input type="text" class="time-input" id="endTime" placeholder="结束时间"
45 - name="params[createdEnd]"/> 45 + name="createdEnd"/>
46 </li> 46 </li>
47 <li> 47 <li>
48 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i 48 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 <li> 58 <li>
59 项 目 号:<input type="text" name="projectNo"/> 59 项 目 号:<input type="text" name="projectNo"/>
60 </li> 60 </li>
61 - <li> 61 + AjaxResult.error("单据号为"+receiptHeader.getCode()+"入库单不需要审核"); <li>
62 交易类型:<select name="type" th:with="type=${@dict.getType('inventoryTransactionType')}"> 62 交易类型:<select name="type" th:with="type=${@dict.getType('inventoryTransactionType')}">
63 <option value="">所有</option> 63 <option value="">所有</option>
64 <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> 64 <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
@@ -67,9 +67,9 @@ @@ -67,9 +67,9 @@
67 67
68 <li class="time"> 68 <li class="time">
69 <label>创建时间: </label> 69 <label>创建时间: </label>
70 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 70 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
71 <span>-</span> 71 <span>-</span>
72 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 72 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
73 </li> 73 </li>
74 <li> 74 <li>
75 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 75 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
@@ -44,9 +44,9 @@ @@ -44,9 +44,9 @@
44 </li> 44 </li>
45 <li class="time"> 45 <li class="time">
46 <label>创建时间: </label> 46 <label>创建时间: </label>
47 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 47 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
48 <span>-</span> 48 <span>-</span>
49 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 49 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
50 </li> 50 </li>
51 <li> 51 <li>
52 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 52 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
@@ -66,9 +66,9 @@ @@ -66,9 +66,9 @@
66 </li> 66 </li>
67 <li class="time"> 67 <li class="time">
68 <label>创建时间: </label> 68 <label>创建时间: </label>
69 - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> 69 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/>
70 <span>-</span> 70 <span>-</span>
71 - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> 71 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
72 </li> 72 </li>
73 <li> 73 <li>
74 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> 74 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@@ -250,7 +250,7 @@ @@ -250,7 +250,7 @@
250 { 250 {
251 field : 'companyCode', 251 field : 'companyCode',
252 title : '货主编码', 252 title : '货主编码',
253 - visible:false 253 + visible: [[${@table.getVisible('p')}]]
254 }, 254 },
255 { 255 {
256 field : 'warehouseCode', 256 field : 'warehouseCode',