【admin】新增#备件领用管理
parent
68c7c1ac16
commit
0127551a59
|
@ -6,6 +6,7 @@ import com.hcy.admin.service.sparePartOutWarehouse.ISparePartOutWarehouseService
|
||||||
import com.hcy.admin.validate.common.PageParam;
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
||||||
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
||||||
|
import com.hcy.admin.vo.sparePartReceive.SparePartReceiveListVo;
|
||||||
import com.hcy.common.core.AjaxResult;
|
import com.hcy.common.core.AjaxResult;
|
||||||
import com.hcy.common.core.PageResult;
|
import com.hcy.common.core.PageResult;
|
||||||
import com.hcy.common.validator.annotation.IDMust;
|
import com.hcy.common.validator.annotation.IDMust;
|
||||||
|
@ -16,7 +17,7 @@ import javax.annotation.Resource;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库管理
|
* 备件领用管理
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("api/sparePartReceive")
|
@RequestMapping("api/sparePartReceive")
|
||||||
|
@ -26,7 +27,7 @@ public class SparePartReceiveController {
|
||||||
ISparePartReceiveService iSparePartReceiveService;
|
ISparePartReceiveService iSparePartReceiveService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库列表
|
* 备件领用列表
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param pageParam 分页参数
|
* @param pageParam 分页参数
|
||||||
|
@ -36,11 +37,11 @@ public class SparePartReceiveController {
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Object list(@Validated PageParam pageParam,
|
public Object list(@Validated PageParam pageParam,
|
||||||
@RequestParam Map<String, String> params) {
|
@RequestParam Map<String, String> params) {
|
||||||
PageResult<SparePartOutWarehouseListVo> list = iSparePartReceiveService.list(pageParam, params);
|
PageResult<SparePartReceiveListVo> list = iSparePartReceiveService.list(pageParam, params);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 备件出库详情
|
* 备件领用详情
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
|
@ -48,18 +49,18 @@ public class SparePartReceiveController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
public Object detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||||
SparePartOutWarehouseListVo detail = iSparePartReceiveService.detail(id);
|
SparePartReceiveListVo detail = iSparePartReceiveService.detail(id);
|
||||||
return AjaxResult.success(detail);
|
return AjaxResult.success(detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库新增
|
* 备件领用新增
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param sparePartStockAuditParam 参数
|
* @param sparePartStockAuditParam 参数
|
||||||
* @return Object
|
* @return Object
|
||||||
*/
|
*/
|
||||||
@Log(title = "备件出库新增")
|
@Log(title = "备件领用新增")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public Object add(@Validated(value = SparePartStockAuditParam.create.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
public Object add(@Validated(value = SparePartStockAuditParam.create.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
||||||
iSparePartReceiveService.add(sparePartStockAuditParam);
|
iSparePartReceiveService.add(sparePartStockAuditParam);
|
||||||
|
@ -67,13 +68,13 @@ public class SparePartReceiveController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库编辑
|
* 备件领用编辑
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param sparePartStockAuditParam 参数
|
* @param sparePartStockAuditParam 参数
|
||||||
* @return Object
|
* @return Object
|
||||||
*/
|
*/
|
||||||
@Log(title = "备件出库编辑")
|
@Log(title = "备件领用编辑")
|
||||||
@PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
public Object edit(@Validated(value = SparePartStockAuditParam.update.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
public Object edit(@Validated(value = SparePartStockAuditParam.update.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
||||||
iSparePartReceiveService.edit(sparePartStockAuditParam);
|
iSparePartReceiveService.edit(sparePartStockAuditParam);
|
||||||
|
@ -81,13 +82,13 @@ public class SparePartReceiveController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库删除
|
* 备件领用删除
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param sparePartStockAuditParam 参数
|
* @param sparePartStockAuditParam 参数
|
||||||
* @return Object
|
* @return Object
|
||||||
*/
|
*/
|
||||||
@Log(title = "备件出库删除")
|
@Log(title = "备件领用删除")
|
||||||
@PostMapping("/del")
|
@PostMapping("/del")
|
||||||
public Object del(@Validated(value = SparePartStockAuditParam.delete.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
public Object del(@Validated(value = SparePartStockAuditParam.delete.class) @RequestBody SparePartStockAuditParam sparePartStockAuditParam) {
|
||||||
iSparePartReceiveService.del(Math.toIntExact(sparePartStockAuditParam.getId()));
|
iSparePartReceiveService.del(Math.toIntExact(sparePartStockAuditParam.getId()));
|
||||||
|
|
|
@ -3,12 +3,13 @@ package com.hcy.admin.service.SparePartReceive;
|
||||||
import com.hcy.admin.validate.common.PageParam;
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
||||||
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
||||||
|
import com.hcy.admin.vo.sparePartReceive.SparePartReceiveListVo;
|
||||||
import com.hcy.common.core.PageResult;
|
import com.hcy.common.core.PageResult;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件入库服务接口类
|
* 备件领用服务接口类
|
||||||
*/
|
*/
|
||||||
public interface ISparePartReceiveService {
|
public interface ISparePartReceiveService {
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ public interface ISparePartReceiveService {
|
||||||
* @return PageResult<SparePartInWarehouseListVo>
|
* @return PageResult<SparePartInWarehouseListVo>
|
||||||
* @author hcy
|
* @author hcy
|
||||||
*/
|
*/
|
||||||
PageResult<SparePartOutWarehouseListVo> list(PageParam pageParam, Map<String, String> params);
|
PageResult<SparePartReceiveListVo> list(PageParam pageParam, Map<String, String> params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件入库详情
|
* 备件入库详情
|
||||||
|
@ -29,7 +30,7 @@ public interface ISparePartReceiveService {
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
* @return SparePartInWarehouseListVo
|
* @return SparePartInWarehouseListVo
|
||||||
*/
|
*/
|
||||||
SparePartOutWarehouseListVo detail(Integer id);
|
SparePartReceiveListVo detail(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件入库新增
|
* 备件入库新增
|
||||||
|
|
|
@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.hcy.admin.AdminThreadLocal;
|
import com.hcy.admin.AdminThreadLocal;
|
||||||
|
import com.hcy.admin.service.SparePartReceive.ISparePartReceiveService;
|
||||||
import com.hcy.admin.service.sparePartOutWarehouse.ISparePartOutWarehouseService;
|
import com.hcy.admin.service.sparePartOutWarehouse.ISparePartOutWarehouseService;
|
||||||
import com.hcy.admin.validate.common.PageParam;
|
import com.hcy.admin.validate.common.PageParam;
|
||||||
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
import com.hcy.admin.validate.sparePartStockAudit.SparePartStockAuditParam;
|
||||||
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
import com.hcy.admin.vo.SparePartOutWarehouseListVo.SparePartOutWarehouseListVo;
|
||||||
|
import com.hcy.admin.vo.sparePartReceive.SparePartReceiveListVo;
|
||||||
import com.hcy.common.core.PageResult;
|
import com.hcy.common.core.PageResult;
|
||||||
import com.hcy.common.entity.SparePartAudit.SparePartAudit;
|
import com.hcy.common.entity.SparePartAudit.SparePartAudit;
|
||||||
import com.hcy.common.entity.sparePart.SparePart;
|
import com.hcy.common.entity.sparePart.SparePart;
|
||||||
|
@ -28,10 +30,10 @@ import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库实现类
|
* 备件领用实现类
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseService {
|
public class SparePartReceiveServiceImpl implements ISparePartReceiveService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
SparePartStockAuditMapper sparePartStockAuditMapper;
|
SparePartStockAuditMapper sparePartStockAuditMapper;
|
||||||
|
@ -46,7 +48,7 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
WarehouseMapper warehouseMapper;
|
WarehouseMapper warehouseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库列表
|
* 备件领用列表
|
||||||
*
|
*
|
||||||
* @param pageParam 分页参数
|
* @param pageParam 分页参数
|
||||||
* @param params 搜索参数
|
* @param params 搜索参数
|
||||||
|
@ -54,7 +56,7 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
* @author hcy
|
* @author hcy
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public PageResult<SparePartOutWarehouseListVo> list(PageParam pageParam, Map<String, String> params) {
|
public PageResult<SparePartReceiveListVo> list(PageParam pageParam, Map<String, String> params) {
|
||||||
Integer page = pageParam.getPageNo();
|
Integer page = pageParam.getPageNo();
|
||||||
Integer limit = pageParam.getPageSize();
|
Integer limit = pageParam.getPageSize();
|
||||||
|
|
||||||
|
@ -65,41 +67,64 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
|
|
||||||
sparePartStockAuditMapper.setSearch(queryWrapper, params, new String[]{
|
sparePartStockAuditMapper.setSearch(queryWrapper, params, new String[]{
|
||||||
"like:receiptNumber@receipt_number:str",
|
"like:receiptNumber@receipt_number:str",
|
||||||
"=:warehouseId@warehouse_id:long",
|
"like:workOrderId@work_order_id:str",
|
||||||
"=:outInWarehouseType@out_in_warehouse_type:long",
|
"like:recipient@recipient:str",
|
||||||
"=:auditState@audit_state:int",
|
"=:purchaseStatus@purchase_status:int",
|
||||||
});
|
});
|
||||||
|
|
||||||
IPage<SparePartStockAudit> iPage = sparePartStockAuditMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
IPage<SparePartStockAudit> iPage = sparePartStockAuditMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||||
List<SparePartOutWarehouseListVo> list = new LinkedList<>();
|
List<SparePartReceiveListVo> list = new LinkedList<>();
|
||||||
for(SparePartStockAudit item : iPage.getRecords()) {
|
for(SparePartStockAudit item : iPage.getRecords()) {
|
||||||
SparePartOutWarehouseListVo vo = new SparePartOutWarehouseListVo();
|
SparePartReceiveListVo vo = new SparePartReceiveListVo();
|
||||||
BeanUtils.copyProperties(item, vo);
|
BeanUtils.copyProperties(item, vo);
|
||||||
vo.setCreateTime(TimeUtil.timestampToDate(item.getCreateTime()));
|
vo.setCreateTime(TimeUtil.timestampToDate(item.getCreateTime()));
|
||||||
vo.setUpdateTime(TimeUtil.timestampToDate(item.getUpdateTime()));
|
vo.setUpdateTime(TimeUtil.timestampToDate(item.getUpdateTime()));
|
||||||
vo.setHandlingTime(TimeUtil.timestampToDate(item.getHandlingTime())); //经办时间
|
vo.setHandlingTime(TimeUtil.timestampToDate(item.getHandlingTime())); //经办时间
|
||||||
vo.setConsigneePhone(item.getConsignee() + "/" + item.getPhone());
|
vo.setRecipientAndPhone(item.getRecipient() + "/" + item.getRecipientPhone()); //领料员工/联系电话
|
||||||
Warehouse warehouse = warehouseMapper.selectOne(
|
int number = 0; //领用数量
|
||||||
new QueryWrapper<Warehouse>()
|
//获取待审核备件信息
|
||||||
.eq("id", item.getWarehouseId())
|
List<SparePartAudit> stockAuditId = sparePartAuditMapper.selectList(
|
||||||
|
new QueryWrapper<SparePartAudit>()
|
||||||
|
.eq("stock_audit_id", item.getId())
|
||||||
|
.eq("is_delete", 0)
|
||||||
|
);
|
||||||
|
//获取备件信息
|
||||||
|
List<SparePartAudit> listVo = new ArrayList<>();
|
||||||
|
for (SparePartAudit sparePartAudit : stockAuditId) {
|
||||||
|
SparePart sparePart = sparePartMapper.selectOne(
|
||||||
|
new QueryWrapper<SparePart>()
|
||||||
|
.eq("id", sparePartAudit.getSparePartsId())
|
||||||
.eq("is_delete", 0)
|
.eq("is_delete", 0)
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
vo.setWarehouseName(warehouse.getWarehouseName());
|
|
||||||
|
SparePartAudit sparePartAudit1 = new SparePartAudit();
|
||||||
|
BeanUtils.copyProperties(sparePart, sparePartAudit1);
|
||||||
|
sparePartAudit1.setId(sparePartAudit.getId());
|
||||||
|
sparePartAudit1.setSparePartsId(sparePart.getId());
|
||||||
|
sparePartAudit1.setStockAuditId(sparePartAudit.getStockAuditId());
|
||||||
|
sparePartAudit1.setCount(sparePartAudit.getCount()); // 出库数量
|
||||||
|
number = number + sparePartAudit.getCount();
|
||||||
|
listVo.add(sparePartAudit1);
|
||||||
|
}
|
||||||
|
vo.setRecipientNumber(number); //领用数量
|
||||||
|
vo.setSparePartAuditList(listVo);
|
||||||
list.add(vo);
|
list.add(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库详情
|
* 备件领用详情
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param id 主键参数
|
* @param id 主键参数
|
||||||
* @return SparePartInWarehouseListVo
|
* @return SparePartInWarehouseListVo
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SparePartOutWarehouseListVo detail(Integer id) {
|
public SparePartReceiveListVo detail(Integer id) {
|
||||||
SparePartStockAudit model = sparePartStockAuditMapper.selectOne(
|
SparePartStockAudit model = sparePartStockAuditMapper.selectOne(
|
||||||
new QueryWrapper<SparePartStockAudit>()
|
new QueryWrapper<SparePartStockAudit>()
|
||||||
.eq("id", id)
|
.eq("id", id)
|
||||||
|
@ -108,16 +133,9 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
|
|
||||||
Assert.notNull(model, "数据不存在");
|
Assert.notNull(model, "数据不存在");
|
||||||
|
|
||||||
SparePartOutWarehouseListVo vo = new SparePartOutWarehouseListVo();
|
SparePartReceiveListVo vo = new SparePartReceiveListVo();
|
||||||
BeanUtils.copyProperties(model, vo);
|
BeanUtils.copyProperties(model, vo);
|
||||||
|
|
||||||
Warehouse warehouse = warehouseMapper.selectOne(
|
|
||||||
new QueryWrapper<Warehouse>()
|
|
||||||
.eq("id", model.getWarehouseId())
|
|
||||||
.eq("is_delete", 0)
|
|
||||||
.last("limit 1"));
|
|
||||||
vo.setWarehouseName(warehouse.getWarehouseName());
|
|
||||||
|
|
||||||
//获取待审核备件信息
|
//获取待审核备件信息
|
||||||
List<SparePartAudit> stockAuditId = sparePartAuditMapper.selectList(
|
List<SparePartAudit> stockAuditId = sparePartAuditMapper.selectList(
|
||||||
new QueryWrapper<SparePartAudit>()
|
new QueryWrapper<SparePartAudit>()
|
||||||
|
@ -141,14 +159,14 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
sparePartAudit1.setCount(sparePartAudit.getCount()); // 出库数量
|
sparePartAudit1.setCount(sparePartAudit.getCount()); // 出库数量
|
||||||
listVo.add(sparePartAudit1);
|
listVo.add(sparePartAudit1);
|
||||||
}
|
}
|
||||||
|
|
||||||
vo.setSparePartAuditList(listVo);
|
vo.setSparePartAuditList(listVo);
|
||||||
|
vo.setConsigneePhone(model.getConsignee() + "/" + model.getPhone());
|
||||||
vo.setHandlingTime(TimeUtil.timestampToDate(model.getHandlingTime())); //经办时间
|
vo.setHandlingTime(TimeUtil.timestampToDate(model.getHandlingTime())); //经办时间
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库新增
|
* 备件领用新增
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param sparePartStockAuditParam 参数
|
* @param sparePartStockAuditParam 参数
|
||||||
|
@ -171,6 +189,17 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
model.setConsignee(sparePartStockAuditParam.getConsignee()); // 收货单位(人员)
|
model.setConsignee(sparePartStockAuditParam.getConsignee()); // 收货单位(人员)
|
||||||
model.setPhone(sparePartStockAuditParam.getPhone()); // 联系电话
|
model.setPhone(sparePartStockAuditParam.getPhone()); // 联系电话
|
||||||
model.setReceiptNumber(generateOrderNumber()); // 单据编号
|
model.setReceiptNumber(generateOrderNumber()); // 单据编号
|
||||||
|
model.setShippingAddress(sparePartStockAuditParam.getShippingAddress()); //收货地址
|
||||||
|
model.setRecipient(sparePartStockAuditParam.getRecipient()); //领用员工
|
||||||
|
model.setRecipientPhone(sparePartStockAuditParam.getRecipientPhone()); //领用员工联系电话
|
||||||
|
model.setConsigner(sparePartStockAuditParam.getConsigner()); //发货人
|
||||||
|
model.setConsignerPhone(sparePartStockAuditParam.getConsignerPhone()); //发货人联系电话
|
||||||
|
model.setShipAddress(sparePartStockAuditParam.getShipAddress()); //发货地址
|
||||||
|
model.setLogisticsCompany(sparePartStockAuditParam.getLogisticsCompany()); //物流公司
|
||||||
|
model.setTrackingNumber(sparePartStockAuditParam.getTrackingNumber()); //物流编号
|
||||||
|
model.setDeliveryMethod(sparePartStockAuditParam.getDeliveryMethod()); //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
|
model.setPurchaseStatus(AuditStateEnum.UNREVIEWED.getStatus()); //状态 未审核
|
||||||
|
|
||||||
|
|
||||||
// 获取当前的用户
|
// 获取当前的用户
|
||||||
Object username = AdminThreadLocal.get("username");
|
Object username = AdminThreadLocal.get("username");
|
||||||
|
@ -202,7 +231,7 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库编辑
|
* 备件领用编辑
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param sparePartStockAuditParam 参数
|
* @param sparePartStockAuditParam 参数
|
||||||
|
@ -218,10 +247,20 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
Assert.notNull(model, "数据不存在!");
|
Assert.notNull(model, "数据不存在!");
|
||||||
model.setId(sparePartStockAuditParam.getId());
|
model.setId(sparePartStockAuditParam.getId());
|
||||||
model.setWarehouseId(sparePartStockAuditParam.getWarehouseId()); // 出库仓库
|
model.setWarehouseId(sparePartStockAuditParam.getWarehouseId()); // 出库仓库
|
||||||
model.setOutInWarehouseType(sparePartStockAuditParam.getOutInWarehouseType()); // 出库类别(1=调拨出库)
|
model.setOutInWarehouseType(sparePartStockAuditParam.getOutInWarehouseType()); // 出库类别 2=员工领料,3=销售出库)
|
||||||
model.setConsignee(sparePartStockAuditParam.getConsignee()); // 收货单位(人员)
|
model.setConsignee(sparePartStockAuditParam.getConsignee()); // 收货单位(人员)
|
||||||
model.setPhone(sparePartStockAuditParam.getPhone()); // 联系电话
|
model.setPhone(sparePartStockAuditParam.getPhone()); // 联系电话
|
||||||
model.setReceiptNumber(sparePartStockAuditParam.getReceiptNumber()); // 单据编号
|
model.setReceiptNumber(generateOrderNumber()); // 单据编号
|
||||||
|
model.setShippingAddress(sparePartStockAuditParam.getShippingAddress()); //收货地址
|
||||||
|
model.setRecipient(sparePartStockAuditParam.getRecipient()); //领用员工
|
||||||
|
model.setRecipientPhone(sparePartStockAuditParam.getRecipientPhone()); //领用员工联系电话
|
||||||
|
model.setConsigner(sparePartStockAuditParam.getConsigner()); //发货人
|
||||||
|
model.setConsignerPhone(sparePartStockAuditParam.getConsignerPhone()); //发货人联系电话
|
||||||
|
model.setShipAddress(sparePartStockAuditParam.getShipAddress()); //发货地址
|
||||||
|
model.setLogisticsCompany(sparePartStockAuditParam.getLogisticsCompany()); //物流公司
|
||||||
|
model.setTrackingNumber(sparePartStockAuditParam.getTrackingNumber()); //物流编号
|
||||||
|
model.setDeliveryMethod(sparePartStockAuditParam.getDeliveryMethod()); //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
|
model.setPurchaseStatus(AuditStateEnum.UNREVIEWED.getStatus()); //状态 未审核
|
||||||
|
|
||||||
List<SparePartAudit> sparePartAuditList = sparePartStockAuditParam.getSparePartAuditList();
|
List<SparePartAudit> sparePartAuditList = sparePartStockAuditParam.getSparePartAuditList();
|
||||||
// 使用StringBuilder来拼接id值
|
// 使用StringBuilder来拼接id值
|
||||||
|
@ -275,7 +314,7 @@ public class SparePartReceiveServiceImpl implements ISparePartOutWarehouseServic
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备件出库删除
|
* 备件领用删除
|
||||||
*
|
*
|
||||||
* @author hcy
|
* @author hcy
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
|
|
|
@ -52,5 +52,5 @@ public class SparePartAuditParam implements Serializable {
|
||||||
@NotNull(message = "unitPrice参数缺失", groups = {create.class, update.class})
|
@NotNull(message = "unitPrice参数缺失", groups = {create.class, update.class})
|
||||||
private BigDecimal unitPrice;
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
private Long count;
|
private Integer count;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,12 +48,8 @@ public class SparePartParam implements Serializable {
|
||||||
@Length(max = 11, message = "unit参数不能超出11个字符", groups = {create.class, update.class})
|
@Length(max = 11, message = "unit参数不能超出11个字符", groups = {create.class, update.class})
|
||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
@NotNull(message = "quantity参数缺失", groups = {create.class, update.class})
|
private Integer quantity;
|
||||||
@DecimalMin(value = "0", message = "quantity参数值不能少于0", groups = {create.class, update.class})
|
|
||||||
private Long quantity;
|
|
||||||
|
|
||||||
@NotNull(message = "unitPrice参数缺失", groups = {create.class, update.class})
|
|
||||||
@DecimalMin(value = "0", message = "unitPrice参数值不能少于0", groups = {create.class, update.class})
|
|
||||||
private BigDecimal unitPrice;
|
private BigDecimal unitPrice;
|
||||||
|
|
||||||
private List<Integer> ids; //备件id集合
|
private List<Integer> ids; //备件id集合
|
||||||
|
|
|
@ -94,10 +94,10 @@ public class SparePartStockAuditParam implements Serializable {
|
||||||
private String shipAddress; //发货地址
|
private String shipAddress; //发货地址
|
||||||
private String logisticsCompany; //物流公司
|
private String logisticsCompany; //物流公司
|
||||||
private String trackingNumber; //物流编号
|
private String trackingNumber; //物流编号
|
||||||
private Long distributionMode; //配送方式(0=物流快递,1=送货上门,2=上门取件)
|
private Integer deliveryMethod; //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
private BigDecimal salesPrice; //销售价
|
private BigDecimal salesPrice; //销售价
|
||||||
private String recipient; //领用员工
|
private String recipient; //领用员工
|
||||||
private String recipientPhone; //领用员工联系电话
|
private String recipientPhone; //领用员工联系电话
|
||||||
private Integer recipientNumber; //领用数量
|
private Integer recipientNumber; //领用数量
|
||||||
private Long state; //状态(0=未审核,1=待管理员审核,2=未通过,3=待发货,4=待收货,5=已完成)
|
private Integer purchaseStatus; //配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,17 @@ public class SparePartReceiveListVo implements Serializable {
|
||||||
private String warehouseName; // 所属仓库名
|
private String warehouseName; // 所属仓库名
|
||||||
private Long outInWarehouseType; // 出入库类别(0=采购入库,1=库存调拨,2=员工领料,3=销售出库)
|
private Long outInWarehouseType; // 出入库类别(0=采购入库,1=库存调拨,2=员工领料,3=销售出库)
|
||||||
|
|
||||||
|
|
||||||
private String workOrderId; //工单号
|
private String workOrderId; //工单号
|
||||||
private String recipient; //领用员工
|
private String recipient; //领用员工
|
||||||
private String recipientPhone; //领用员工联系电话
|
private String recipientPhone; //领用员工联系电话
|
||||||
private Integer recipientNumber; //领用数量
|
private Integer recipientNumber; //领用数量
|
||||||
private Long state; //状态(0=未审核,1=待管理员审核,2=未通过,3=待发货,4=待收货,5=已完成)
|
private Integer purchaseStatus; //配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
private String shippingAddress; //收货地址
|
private String shippingAddress; //收货地址
|
||||||
private String consigner; //发货人
|
private String consigner; //发货人
|
||||||
private String consignerPhone; //发货人联系电话
|
private String consignerPhone; //发货人联系电话
|
||||||
private String shipAddress; //发货地址
|
private String shipAddress; //发货地址
|
||||||
private String logisticsCompany; //物流公司
|
private String logisticsCompany; //物流公司
|
||||||
private String trackingNumber; //物流编号
|
private String trackingNumber; //物流编号
|
||||||
|
private String recipientAndPhone; //领用员工/联系电话
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,11 +48,11 @@ public class SparePartStockAuditDetailVo implements Serializable {
|
||||||
private String shipAddress; //发货地址
|
private String shipAddress; //发货地址
|
||||||
private String logisticsCompany; //物流公司
|
private String logisticsCompany; //物流公司
|
||||||
private String trackingNumber; //物流编号
|
private String trackingNumber; //物流编号
|
||||||
private Long distributionMode; //配送方式(0=物流快递,1=送货上门,2=上门取件)
|
private Integer deliveryMethod; //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
private BigDecimal salesPrice; //销售价
|
private BigDecimal salesPrice; //销售价
|
||||||
private String recipient; //领用员工
|
private String recipient; //领用员工
|
||||||
private String recipientPhone; //领用员工联系电话
|
private String recipientPhone; //领用员工联系电话
|
||||||
private Integer recipientNumber; //领用数量
|
private Integer recipientNumber; //领用数量
|
||||||
private Long state; //状态(0=未审核,1=待管理员审核,2=未通过,3=待发货,4=待收货,5=已完成)
|
private Integer purchaseStatus; //配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,11 +47,11 @@ public class SparePartStockAuditListVo implements Serializable {
|
||||||
private String shipAddress; //发货地址
|
private String shipAddress; //发货地址
|
||||||
private String logisticsCompany; //物流公司
|
private String logisticsCompany; //物流公司
|
||||||
private String trackingNumber; //物流编号
|
private String trackingNumber; //物流编号
|
||||||
private Long distributionMode; //配送方式(0=物流快递,1=送货上门,2=上门取件)
|
private Integer deliveryMethod; //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
private BigDecimal salesPrice; //销售价
|
private BigDecimal salesPrice; //销售价
|
||||||
private String recipient; //领用员工
|
private String recipient; //领用员工
|
||||||
private String recipientPhone; //领用员工联系电话
|
private String recipientPhone; //领用员工联系电话
|
||||||
private Integer recipientNumber; //领用数量
|
private Integer recipientNumber; //领用数量
|
||||||
private Long state; //状态(0=未审核,1=待管理员审核,2=未通过,3=待发货,4=待收货,5=已完成)
|
private Integer purchaseStatus; //配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,6 @@ public class SparePartAudit implements Serializable {
|
||||||
private Long createTime; // 创建时间
|
private Long createTime; // 创建时间
|
||||||
private Long updateTime; // 更新时间
|
private Long updateTime; // 更新时间
|
||||||
private Long deleteTime; // 删除时间
|
private Long deleteTime; // 删除时间
|
||||||
private Long count; // 出入库数量
|
private Integer count; // 出入库数量
|
||||||
|
|
||||||
}
|
}
|
|
@ -23,7 +23,7 @@ public class SparePart implements Serializable {
|
||||||
private Long warehouseId; // 所属仓库
|
private Long warehouseId; // 所属仓库
|
||||||
private String specificationsModel; // 规格型号
|
private String specificationsModel; // 规格型号
|
||||||
private String unit; // 单位
|
private String unit; // 单位
|
||||||
private Long quantity; // 库存数量
|
private Integer quantity; // 库存数量
|
||||||
private BigDecimal unitPrice; // 单价
|
private BigDecimal unitPrice; // 单价
|
||||||
private Integer isDelete; // 是否删除: [0=否, 1=是]
|
private Integer isDelete; // 是否删除: [0=否, 1=是]
|
||||||
private Long createTime; // 创建时间
|
private Long createTime; // 创建时间
|
||||||
|
|
|
@ -49,10 +49,10 @@ public class SparePartStockAudit implements Serializable {
|
||||||
private String shipAddress; //发货地址
|
private String shipAddress; //发货地址
|
||||||
private String logisticsCompany; //物流公司
|
private String logisticsCompany; //物流公司
|
||||||
private String trackingNumber; //物流编号
|
private String trackingNumber; //物流编号
|
||||||
private Long distributionMode; //配送方式(0=物流快递,1=送货上门,2=上门取件)
|
private Integer deliveryMethod; //配送方式(0=物流快递,1=上门取件,2=送货上门)
|
||||||
private BigDecimal salesPrice; //销售价
|
private BigDecimal salesPrice; //销售价
|
||||||
private String recipient; //领用员工
|
private String recipient; //领用员工
|
||||||
private String recipientPhone; //领用员工联系电话
|
private String recipientPhone; //领用员工联系电话
|
||||||
private Integer recipientNumber; //领用数量
|
private Integer recipientNumber; //领用数量
|
||||||
private Long state; //状态(0=未审核,1=待管理员审核,2=未通过,3=待发货,4=待收货,5=已完成)
|
private Integer purchaseStatus; //配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
}
|
}
|
|
@ -11,9 +11,15 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public enum AuditStateEnum {
|
public enum AuditStateEnum {
|
||||||
UNREVIEWED(0, "未审核"),
|
//配件领用状态(0=待审核,1=未通过,2=待管理员审核,3=待发货,4=待收货,5=已完成)
|
||||||
|
UNREVIEWED(0, "待审核"),
|
||||||
AUDITED(1, "已审核"),
|
AUDITED(1, "已审核"),
|
||||||
CANCELED(2,"已取消"),
|
CANCELED(2,"已取消"),
|
||||||
|
NOTPASSSTATE(1, "未通过"),
|
||||||
|
CHECKPENDING(2, "待管理员审核"),
|
||||||
|
WAITDELIVER(3, "待发货"),
|
||||||
|
WAITFORRECEIVING(4, "待收货"),
|
||||||
|
DONE(5, "已完成"),
|
||||||
|
|
||||||
//审核结果(0=已通过,1=未通过)
|
//审核结果(0=已通过,1=未通过)
|
||||||
NOTPASS(1,"未通过"),
|
NOTPASS(1,"未通过"),
|
||||||
|
|
Loading…
Reference in New Issue