生产流程

This commit is contained in:
weihongyang 2020-08-24 13:19:45 +08:00
parent c56f73ed74
commit 1288ed083d
26 changed files with 222 additions and 15 deletions

View File

@ -2,5 +2,9 @@ package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneByCoatingGlue; import com.deer.wms.produce.manage.model.MtAloneByCoatingGlue;
import com.deer.wms.project.seed.core.mapper.Mapper; import com.deer.wms.project.seed.core.mapper.Mapper;
import java.util.List;
public interface MtAloneByCoatingGlueMapper extends Mapper<MtAloneByCoatingGlue> { public interface MtAloneByCoatingGlueMapper extends Mapper<MtAloneByCoatingGlue> {
List<MtAloneByCoatingGlue> getAllByCompany(Integer companyId);
} }

View File

@ -1,6 +1,8 @@
package com.deer.wms.produce.manage.dao; package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneByProductInfo; import com.deer.wms.produce.manage.model.MtAloneByProductInfo;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoParams;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoVo;
import com.deer.wms.project.seed.core.mapper.Mapper; import com.deer.wms.project.seed.core.mapper.Mapper;
import java.util.List; import java.util.List;
@ -9,4 +11,6 @@ public interface MtAloneByProductInfoMapper extends Mapper<MtAloneByProductInfo>
void deleteByOrderInfoId(Integer id); void deleteByOrderInfoId(Integer id);
List<MtAloneByProductInfo> findByOrderInfoId(Integer id); List<MtAloneByProductInfo> findByOrderInfoId(Integer id);
MtAloneByProductInfoVo initiationProcess(MtAloneByProductInfoParams params);
} }

View File

@ -1,6 +1,11 @@
package com.deer.wms.produce.manage.dao; package com.deer.wms.produce.manage.dao;
import com.deer.wms.produce.manage.model.MtAloneByWeavCloth; import com.deer.wms.produce.manage.model.MtAloneByWeavCloth;
import com.deer.wms.produce.manage.model.MtAloneByWeavClothParams;
import com.deer.wms.project.seed.core.mapper.Mapper; import com.deer.wms.project.seed.core.mapper.Mapper;
import java.util.List;
public interface MtAloneByWeavClothMapper extends Mapper<MtAloneByWeavCloth> { public interface MtAloneByWeavClothMapper extends Mapper<MtAloneByWeavCloth> {
List<MtAloneByWeavCloth> greyCloth(MtAloneByWeavClothParams params);
} }

View File

@ -17,5 +17,7 @@ public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
List<MtAloneProcessDo> findDetectProcessByBatchDet(ProductProcessBatchDetParams params); List<MtAloneProcessDo> findDetectProcessByBatchDet(ProductProcessBatchDetParams params);
List<MtAloneProcess> getSupplier(MtAloneProcessParams mtAloneProcessParams);
//List<Integer> processStepListByProdprocid(ProductProcessParams params); //List<Integer> processStepListByProdprocid(ProductProcessParams params);
} }

View File

@ -15,7 +15,7 @@
<result column="note" jdbcType="VARCHAR" property="note" /> <result column="note" jdbcType="VARCHAR" property="note" />
</resultMap> </resultMap>
<select id="getAllByShelfStatus" parameterType="Integer" resultMap="BaseResultMap"> <select id="getAllByShelfStatus" parameterType="com.deer.wms.produce.manage.model.MtAloneByAShelf" resultMap="BaseResultMap">
SELECT * SELECT *
FROM mt_alone_by_a_shelf FROM mt_alone_by_a_shelf
WHERE a_shelf_status = #{aShelfStatus} WHERE a_shelf_status = #{aShelfStatus}

View File

@ -16,4 +16,10 @@
<result column="spec" jdbcType="VARCHAR" property="spec" /> <result column="spec" jdbcType="VARCHAR" property="spec" />
<result column="note" jdbcType="VARCHAR" property="note" /> <result column="note" jdbcType="VARCHAR" property="note" />
</resultMap> </resultMap>
<select id="getAllByCompany" parameterType="Integer" resultMap="BaseResultMap">
SELECT *
FROM mt_alone_by_coating_glue
WHERE gule_status = 0
AND company_id = #{companyId}
</select>
</mapper> </mapper>

View File

@ -35,6 +35,11 @@
<result column="complete" jdbcType="INTEGER" property="complete" /> <result column="complete" jdbcType="INTEGER" property="complete" />
</resultMap> </resultMap>
<resultMap id="BaseResultMapAndOrder" type="com.deer.wms.produce.manage.model.MtAloneByOrderInfo" extends="BaseResultMap">
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="client_code" jdbcType="VARCHAR" property="clientCode" />
</resultMap>
<delete id="deleteByOrderInfoId" parameterType="Integer"> <delete id="deleteByOrderInfoId" parameterType="Integer">
delete FROM mt_alone_by_product_info delete FROM mt_alone_by_product_info
WHERE order_info_id = #{id} WHERE order_info_id = #{id}
@ -46,4 +51,11 @@
WHERE order_info_id = #{id} WHERE order_info_id = #{id}
AND product_status = 0 AND product_status = 0
</select> </select>
<select id="initiationProcess" resultType="com.deer.wms.produce.manage.model.MtAloneByProductInfoVo" parameterType="com.deer.wms.produce.manage.model.MtAloneByProductInfoParams">
SELECT mabpi.*,maboi.*
FROM mt_alone_by_product_info mabpi
LEFT JOIN mt_alone_by_order_info maboi ON mabpi.order_info_id = maboi.id
WHERE mabpi.id = #{params.id}
</select>
</mapper> </mapper>

View File

@ -28,4 +28,12 @@
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="note" jdbcType="VARCHAR" property="note" /> <result column="note" jdbcType="VARCHAR" property="note" />
</resultMap> </resultMap>
<select id="greyCloth" parameterType="com.deer.wms.produce.manage.model.MtAloneByWeavClothParams" resultMap="BaseResultMap">
SELECT *
FROM mt_alone_by_weav_cloth
WHERE is_stock = #{params.isStock}
AND company_id = #{params.companyId}
AND product_id = #{params.productId}
</select>
</mapper> </mapper>

View File

@ -172,4 +172,10 @@
</where> ORDER BY process.process_step ASC </where> ORDER BY process.process_step ASC
</select> </select>
<select id="getSupplier" resultMap="BaseResultMap" parameterType="com.deer.wms.produce.manage.model.MtAloneProcessParams">
SELECT *
FROM mt_alone_processor
WHERE company_id = #{companyId}
</select>
</mapper> </mapper>

View File

@ -25,6 +25,12 @@ public class MtAloneByCoatingGlue {
@Column(name = "gule_status") @Column(name = "gule_status")
private Integer guleStatus; private Integer guleStatus;
/**
* 绑定公司id
*/
@Column(name = "company_id")
private Integer companyId;
/** /**
* 胶水类型数字字典code内容打底胶水面涂胶水其它胶水 * 胶水类型数字字典code内容打底胶水面涂胶水其它胶水
*/ */
@ -117,6 +123,14 @@ public class MtAloneByCoatingGlue {
return guleStatus; return guleStatus;
} }
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
/** /**
* 设置状态 0处理中1处理完成2逻辑删除 * 设置状态 0处理中1处理完成2逻辑删除
* *

View File

@ -112,6 +112,11 @@ public class MtAloneByProductInfo {
*/ */
private String note; private String note;
/**
* 发起流程
*/
private String initiationProcess;
/** /**
* 现货 是否 全部ok 1 true2 false * 现货 是否 全部ok 1 true2 false
*/ */
@ -501,6 +506,14 @@ public class MtAloneByProductInfo {
this.note = note; this.note = note;
} }
public String getInitiationProcess() {
return initiationProcess;
}
public void setInitiationProcess(String initiationProcess) {
this.initiationProcess = initiationProcess;
}
/** /**
* 获取现货 是否 全部ok 1 true2 false * 获取现货 是否 全部ok 1 true2 false
* *

View File

@ -6,4 +6,13 @@ import com.deer.wms.project.seed.core.service.QueryParams;
* Created by on 2020/08/18. * Created by on 2020/08/18.
*/ */
public class MtAloneByProductInfoParams extends QueryParams { public class MtAloneByProductInfoParams extends QueryParams {
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
} }

View File

@ -0,0 +1,28 @@
package com.deer.wms.produce.manage.model;
/**
* @Author weihongyang
* @Date 2020/8/24 9:40
* @Version 1.0
*/
public class MtAloneByProductInfoVo extends MtAloneByProductInfo{
private String orderCode;
private String clientCode;
public String getOrderCode() {
return orderCode;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getClientCode() {
return clientCode;
}
public void setClientCode(String clientCode) {
this.clientCode = clientCode;
}
}

View File

@ -6,4 +6,23 @@ import com.deer.wms.project.seed.core.service.QueryParams;
* Created by on 2020/08/18. * Created by on 2020/08/18.
*/ */
public class MtAloneByWeavClothParams extends QueryParams { public class MtAloneByWeavClothParams extends QueryParams {
private Integer isStock;
private Integer productId;
public Integer getIsStock() {
return isStock;
}
public void setIsStock(Integer isStock) {
this.isStock = isStock;
}
public Integer getProductId() {
return productId;
}
public void setProductId(Integer productId) {
this.productId = productId;
}
} }

View File

@ -12,5 +12,5 @@ import java.util.List;
public interface MtAloneByCoatingGlueService extends Service<MtAloneByCoatingGlue, Integer> { public interface MtAloneByCoatingGlueService extends Service<MtAloneByCoatingGlue, Integer> {
List<MtAloneByCoatingGlue> getAllByCompany(Integer companyId);
} }

View File

@ -3,6 +3,7 @@ package com.deer.wms.produce.manage.service;
import com.deer.wms.produce.manage.model.MtAloneByProductInfo; import com.deer.wms.produce.manage.model.MtAloneByProductInfo;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoParams; import com.deer.wms.produce.manage.model.MtAloneByProductInfoParams;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoVo;
import com.deer.wms.project.seed.core.service.Service; import com.deer.wms.project.seed.core.service.Service;
import java.util.List; import java.util.List;
@ -15,4 +16,6 @@ public interface MtAloneByProductInfoService extends Service<MtAloneByProductInf
void deleteByOrderInfoId(Integer id); void deleteByOrderInfoId(Integer id);
List<MtAloneByProductInfo> findByOrderInfoId(Integer id); List<MtAloneByProductInfo> findByOrderInfoId(Integer id);
MtAloneByProductInfoVo initiationProcess(MtAloneByProductInfoParams params);
} }

View File

@ -12,5 +12,5 @@ import java.util.List;
public interface MtAloneByWeavClothService extends Service<MtAloneByWeavCloth, Integer> { public interface MtAloneByWeavClothService extends Service<MtAloneByWeavCloth, Integer> {
List<MtAloneByWeavCloth> greyCloth(MtAloneByWeavClothParams params);
} }

View File

@ -24,5 +24,7 @@ public interface MtAloneProcessService extends Service<MtAloneProcess, Integer>
List<MtAloneProcessDo> findDetectProcessByBatchDet(ProductProcessBatchDetParams params); List<MtAloneProcessDo> findDetectProcessByBatchDet(ProductProcessBatchDetParams params);
List<MtAloneProcess> getSupplier(MtAloneProcessParams mtAloneProcessParams);
//List<Integer> processStepListByProdprocid(ProductProcessParams params); //List<Integer> processStepListByProdprocid(ProductProcessParams params);
} }

View File

@ -22,5 +22,8 @@ public class MtAloneByCoatingGlueServiceImpl extends AbstractService<MtAloneByCo
private MtAloneByCoatingGlueMapper mtAloneByCoatingGlueMapper; private MtAloneByCoatingGlueMapper mtAloneByCoatingGlueMapper;
@Override
public List<MtAloneByCoatingGlue> getAllByCompany(Integer companyId) {
return mtAloneByCoatingGlueMapper.getAllByCompany(companyId);
}
} }

View File

@ -3,6 +3,7 @@ package com.deer.wms.produce.manage.service.impl;
import com.deer.wms.produce.manage.dao.MtAloneByProductInfoMapper; import com.deer.wms.produce.manage.dao.MtAloneByProductInfoMapper;
import com.deer.wms.produce.manage.model.MtAloneByProductInfo; import com.deer.wms.produce.manage.model.MtAloneByProductInfo;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoParams; import com.deer.wms.produce.manage.model.MtAloneByProductInfoParams;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoVo;
import com.deer.wms.produce.manage.service.MtAloneByProductInfoService; import com.deer.wms.produce.manage.service.MtAloneByProductInfoService;
import com.deer.wms.project.seed.core.service.AbstractService; import com.deer.wms.project.seed.core.service.AbstractService;
@ -31,4 +32,9 @@ public class MtAloneByProductInfoServiceImpl extends AbstractService<MtAloneByPr
public List<MtAloneByProductInfo> findByOrderInfoId(Integer id) { public List<MtAloneByProductInfo> findByOrderInfoId(Integer id) {
return mtAloneByProductInfoMapper.findByOrderInfoId(id); return mtAloneByProductInfoMapper.findByOrderInfoId(id);
} }
@Override
public MtAloneByProductInfoVo initiationProcess(MtAloneByProductInfoParams params) {
return mtAloneByProductInfoMapper.initiationProcess(params);
}
} }

View File

@ -22,4 +22,8 @@ public class MtAloneByWeavClothServiceImpl extends AbstractService<MtAloneByWeav
private MtAloneByWeavClothMapper mtAloneByWeavClothMapper; private MtAloneByWeavClothMapper mtAloneByWeavClothMapper;
@Override
public List<MtAloneByWeavCloth> greyCloth(MtAloneByWeavClothParams params) {
return mtAloneByWeavClothMapper.greyCloth(params);
}
} }

View File

@ -122,6 +122,11 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
return mtAloneProcessMapper.findDetectProcessByBatchDet(params); return mtAloneProcessMapper.findDetectProcessByBatchDet(params);
} }
@Override
public List<MtAloneProcess> getSupplier(MtAloneProcessParams mtAloneProcessParams) {
return mtAloneProcessMapper.getSupplier(mtAloneProcessParams);
}
//@Override //@Override
//public List<Integer> processStepListByProdprocid(ProductProcessParams params) { //public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
// return mtAloneProcessMapper.processStepListByProdprocid(params); // return mtAloneProcessMapper.processStepListByProdprocid(params);

View File

@ -30,7 +30,7 @@ import java.util.List;
/** /**
* Created by on 2020/08/18. * Created by on 2020/08/18.
*/ */
@Api(description = "xxx接口") @Api(description = "胶水接口")
@RestController @RestController
@RequestMapping("/mt/alone/by/coating/glues") @RequestMapping("/mt/alone/by/coating/glues")
public class MtAloneByCoatingGlueController { public class MtAloneByCoatingGlueController {
@ -90,4 +90,15 @@ public class MtAloneByCoatingGlueController {
return ResultGenerator.genSuccessResult(pageInfo); return ResultGenerator.genSuccessResult(pageInfo);
} }
/**
* 查询全部胶水 条件公司id
*/
@GetMapping("/get/all/by/company")
public Result getAllByCompany(@ApiIgnore @User CurrentUser currentUser) {
if (currentUser == null) {
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR, "未登录错误", null);
}
List<MtAloneByCoatingGlue> list = mtAloneByCoatingGlueService.getAllByCompany(currentUser.getCompanyId());
return ResultGenerator.genSuccessResult(list);
}
} }

View File

@ -203,4 +203,5 @@ public class MtAloneByOrderInfoController {
List<UserListVO> list = userInfoService.findUserFormList(userInfoCriteria); List<UserListVO> list = userInfoService.findUserFormList(userInfoCriteria);
return ResultGenerator.genSuccessResult(list); return ResultGenerator.genSuccessResult(list);
} }
} }

View File

@ -5,6 +5,7 @@ import com.deer.wms.base.system.model.MtAloneProductLibraryParams;
import com.deer.wms.base.system.service.MtAloneProductLibraryService; import com.deer.wms.base.system.service.MtAloneProductLibraryService;
import com.deer.wms.base.system.web.MtAloneProductLibraryController; import com.deer.wms.base.system.web.MtAloneProductLibraryController;
import com.deer.wms.produce.manage.model.MtAloneByAShelf; import com.deer.wms.produce.manage.model.MtAloneByAShelf;
import com.deer.wms.produce.manage.model.MtAloneByProductInfoVo;
import com.deer.wms.project.seed.annotation.OperateLog; import com.deer.wms.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.constant.SystemManageConstant; import com.deer.wms.project.seed.constant.SystemManageConstant;
import com.deer.wms.project.seed.core.result.CommonCode; import com.deer.wms.project.seed.core.result.CommonCode;
@ -113,4 +114,16 @@ public class MtAloneByProductInfoController {
return ResultGenerator.genSuccessResult(list); return ResultGenerator.genSuccessResult(list);
} }
/**
* 发起流程
*/
@PostMapping("initiation/process")
public Result initiationProcess(MtAloneByProductInfoParams params,@ApiIgnore @User CurrentUser currentUser){
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
MtAloneByProductInfoVo mtAloneByProductInfoVo = mtAloneByProductInfoService.initiationProcess(params);
return ResultGenerator.genSuccessResult(mtAloneByProductInfoVo);
}
} }

View File

@ -1,13 +1,12 @@
package com.deer.wms.produce.manage.web; package com.deer.wms.produce.manage.web;
import com.deer.wms.produce.manage.model.MtAloneByAShelf; import com.deer.wms.produce.manage.model.*;
import com.deer.wms.produce.manage.service.MtAloneProcessService;
import com.deer.wms.project.seed.annotation.OperateLog; import com.deer.wms.project.seed.annotation.OperateLog;
import com.deer.wms.project.seed.constant.SystemManageConstant; import com.deer.wms.project.seed.constant.SystemManageConstant;
import com.deer.wms.project.seed.core.result.CommonCode; import com.deer.wms.project.seed.core.result.CommonCode;
import com.deer.wms.project.seed.core.result.Result; import com.deer.wms.project.seed.core.result.Result;
import com.deer.wms.project.seed.core.result.ResultGenerator; import com.deer.wms.project.seed.core.result.ResultGenerator;
import com.deer.wms.produce.manage.model.MtAloneByWeavCloth;
import com.deer.wms.produce.manage.model.MtAloneByWeavClothParams;
import com.deer.wms.produce.manage.service.MtAloneByWeavClothService; import com.deer.wms.produce.manage.service.MtAloneByWeavClothService;
import com.deer.wms.intercept.annotation.User; import com.deer.wms.intercept.annotation.User;
import com.deer.wms.intercept.common.data.CurrentUser; import com.deer.wms.intercept.common.data.CurrentUser;
@ -30,7 +29,7 @@ import java.util.List;
/** /**
* Created by on 2020/08/18. * Created by on 2020/08/18.
*/ */
@Api(description = "xxx接口") @Api(description = "织布接口")
@RestController @RestController
@RequestMapping("/mt/alone/by/weav/cloths") @RequestMapping("/mt/alone/by/weav/cloths")
public class MtAloneByWeavClothController { public class MtAloneByWeavClothController {
@ -38,15 +37,18 @@ public class MtAloneByWeavClothController {
@Autowired @Autowired
private MtAloneByWeavClothService mtAloneByWeavClothService; private MtAloneByWeavClothService mtAloneByWeavClothService;
@OperateLog(description = "添加xxx", type = "增加") @Autowired
@ApiOperation(value = "添加xxx", notes = "添加xxx") private MtAloneProcessService mtAloneProcessService;
@OperateLog(description = "添加坯布", type = "增加")
@ApiOperation(value = "添加坯布", notes = "添加坯布")
@PostMapping("/add") @PostMapping("/add")
public Result add(@RequestBody MtAloneByWeavCloth mtAloneByWeavCloth, @ApiIgnore @User CurrentUser currentUser) { public Result add(@RequestBody MtAloneByWeavCloth mtAloneByWeavCloth, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){ if(currentUser==null){
return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null ); return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null );
} }
mtAloneByWeavCloth.setCreateTime(new Date()); mtAloneByWeavCloth.setCreateTime(new Date());
mtAloneByWeavCloth.setCompanyId(currentUser.getCompanyId()); mtAloneByWeavCloth.setCompanyId(currentUser.getCompanyId());
mtAloneByWeavClothService.save(mtAloneByWeavCloth); mtAloneByWeavClothService.save(mtAloneByWeavCloth);
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }
@ -59,8 +61,8 @@ public class MtAloneByWeavClothController {
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }
@OperateLog(description = "修改xxx", type = "更新") @OperateLog(description = "修改坯布", type = "更新")
@ApiOperation(value = "修改xxx", notes = "修改xxx") @ApiOperation(value = "修改坯布", notes = "修改坯布")
@PostMapping("/update") @PostMapping("/update")
public Result update(@RequestBody MtAloneByWeavCloth mtAloneByWeavCloth) { public Result update(@RequestBody MtAloneByWeavCloth mtAloneByWeavCloth) {
mtAloneByWeavCloth.setUpdateTime(new Date()); mtAloneByWeavCloth.setUpdateTime(new Date());
@ -92,4 +94,31 @@ public class MtAloneByWeavClothController {
return ResultGenerator.genSuccessResult(pageInfo); return ResultGenerator.genSuccessResult(pageInfo);
} }
/**
* 坯布情况
*/
@GetMapping("/grey/cloth")
public Result greyCloth(MtAloneByWeavClothParams params, @ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
params.setCompanyId(currentUser.getCompanyId());
List<MtAloneByWeavCloth> list = mtAloneByWeavClothService.greyCloth(params);
return ResultGenerator.genSuccessResult(list);
}
/**
* 获取供应商
*/
@GetMapping("/get/supplier")
public Result getSupplier(@ApiIgnore @User CurrentUser currentUser) {
if(currentUser==null){
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
}
MtAloneProcessParams mtAloneProcessParams = new MtAloneProcessParams();
mtAloneProcessParams.setCompanyId(currentUser.getCompanyId());
List<MtAloneProcess> mtAloneProcessList = mtAloneProcessService.getSupplier(mtAloneProcessParams);
return ResultGenerator.genSuccessResult(mtAloneProcessList);
}
} }