新增根据批次加工单获取批次明细接口,修改根据批次加工单获取工序和明细的接口
Bu işleme şunda yer alıyor:
ebeveyn
3295968f76
işleme
f520e678f1
@ -16,5 +16,5 @@ public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
|
|||||||
|
|
||||||
void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess);
|
void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess);
|
||||||
|
|
||||||
List<Integer> processStepListByProdprocid(ProductProcessParams params);
|
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
|
||||||
}
|
}
|
@ -10,5 +10,7 @@ import java.util.List;
|
|||||||
public interface ProductProcessBatchDetMapper extends Mapper<ProductProcessBatchDet> {
|
public interface ProductProcessBatchDetMapper extends Mapper<ProductProcessBatchDet> {
|
||||||
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params);
|
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params);
|
||||||
|
|
||||||
List<String> volumeStepListByProdprocid(ProductProcessParams params);
|
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
|
||||||
|
|
||||||
|
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
package com.deer.wms.produce.manage.dao;
|
package com.deer.wms.produce.manage.dao;
|
||||||
|
|
||||||
|
|
||||||
import com.deer.wms.produce.manage.model.ProcessStepAndVolumeNum;
|
|
||||||
import com.deer.wms.produce.manage.model.ProductProcess;
|
import com.deer.wms.produce.manage.model.ProductProcess;
|
||||||
import com.deer.wms.produce.manage.model.ProductProcessParams;
|
import com.deer.wms.produce.manage.model.ProductProcessParams;
|
||||||
import com.deer.wms.produce.manage.model.ProductProcessVo;
|
import com.deer.wms.produce.manage.model.ProductProcessVo;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<result column="status" jdbcType="INTEGER" property="status" />
|
<result column="status" jdbcType="INTEGER" property="status" />
|
||||||
<result column="batch_code" jdbcType="VARCHAR" property="batchCode" />
|
<result column="batch_code" jdbcType="VARCHAR" property="batchCode" />
|
||||||
<result column="delivery_code" jdbcType="VARCHAR" property="deliveryCode" />
|
<result column="delivery_code" jdbcType="VARCHAR" property="deliveryCode" />
|
||||||
<result column="product_process_code" jdbcType="VARCHAR" property="productProcessCode" />
|
<result column="product_process_id" jdbcType="INTEGER" property="productProcessId" />
|
||||||
<result column="volume_num" jdbcType="VARCHAR" property="volumeNum" />
|
<result column="volume_num" jdbcType="VARCHAR" property="volumeNum" />
|
||||||
<result column="batch_det_code" jdbcType="VARCHAR" property="batchDetCode" />
|
<result column="batch_det_code" jdbcType="VARCHAR" property="batchDetCode" />
|
||||||
<result column="len" jdbcType="REAL" property="len" />
|
<result column="len" jdbcType="REAL" property="len" />
|
||||||
@ -38,4 +38,22 @@
|
|||||||
</where>
|
</where>
|
||||||
ORDER BY CAST(det.volume_num AS DECIMAL)
|
ORDER BY CAST(det.volume_num AS DECIMAL)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="BaseResultMap">
|
||||||
|
SELECT det.id, det.create_time, det.batch_code, det.delivery_code,
|
||||||
|
det.volume_num, det.batch_det_code, det.len, det.delivery_len,
|
||||||
|
det.detection_len, det.shrinkage, det.dyelot_num, det.dyelot_order
|
||||||
|
FROM mt_alone_product_process_batch_det det
|
||||||
|
<where>
|
||||||
|
<if test="productProcessId != null">
|
||||||
|
AND det.product_process_id = #{productProcessId}
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
AND det.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY CAST(det.volume_num AS DECIMAL)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于打卷系统,根据批次加工单号获取其下的所有工序和明细
|
||||||
|
* @Author: hy
|
||||||
|
* @Date: 2020/3/11 15:10
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ProcessAndDet {
|
||||||
|
|
||||||
|
private List<MtAloneProcessVo> processVoList;//工序扩展信息
|
||||||
|
|
||||||
|
private List<ProductProcessBatchDet> productProcessBatchDetList;//明细信息
|
||||||
|
|
||||||
|
public List<MtAloneProcessVo> getProcessVoList() {
|
||||||
|
return processVoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessVoList(List<MtAloneProcessVo> processVoList) {
|
||||||
|
this.processVoList = processVoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ProductProcessBatchDet> getProductProcessBatchDetList() {
|
||||||
|
return productProcessBatchDetList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductProcessBatchDetList(List<ProductProcessBatchDet> productProcessBatchDetList) {
|
||||||
|
this.productProcessBatchDetList = productProcessBatchDetList;
|
||||||
|
}
|
||||||
|
}
|
@ -1,31 +0,0 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用于打卷系统,根据批次加工单号获取其下的所有工序和卷号
|
|
||||||
* @Author: hy
|
|
||||||
* @Date: 2020/3/11 15:10
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
public class ProcessStepAndVolumeNum {
|
|
||||||
private List<Integer> processStepList;
|
|
||||||
|
|
||||||
private List<String> volumeStepList;
|
|
||||||
|
|
||||||
public List<Integer> getProcessStepList() {
|
|
||||||
return processStepList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProcessStepList(List<Integer> processStepList) {
|
|
||||||
this.processStepList = processStepList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getVolumeStepList() {
|
|
||||||
return volumeStepList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVolumeStepList(List<String> volumeStepList) {
|
|
||||||
this.volumeStepList = volumeStepList;
|
|
||||||
}
|
|
||||||
}
|
|
@ -20,5 +20,5 @@ public interface MtAloneProcessService extends Service<MtAloneProcess, Integer>
|
|||||||
|
|
||||||
void updateProcess(ProcessHo processHo);
|
void updateProcess(ProcessHo processHo);
|
||||||
|
|
||||||
List<Integer> processStepListByProdprocid(ProductProcessParams params);
|
//List<Integer> processStepListByProdprocid(ProductProcessParams params);
|
||||||
}
|
}
|
||||||
|
@ -15,5 +15,7 @@ public interface ProductProcessBatchDetService extends Service<ProductProcessBat
|
|||||||
|
|
||||||
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params) ;
|
List<ProductProcessBatchDet> findList(ProductProcessBatchDetParams params) ;
|
||||||
|
|
||||||
List<String> volumeStepListByProdprocid(ProductProcessParams params);
|
//List<String> volumeStepListByProdprocid(ProductProcessParams params);
|
||||||
|
|
||||||
|
List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ public interface ProductProcessService extends Service<ProductProcess, Integer>
|
|||||||
|
|
||||||
void addProduceProcess(ProductProcessHo productProcessHo, CurrentUser currentUser);
|
void addProduceProcess(ProductProcessHo productProcessHo, CurrentUser currentUser);
|
||||||
|
|
||||||
ProcessStepAndVolumeNum stepAndNumByProdprocid(ProductProcessParams params);
|
//ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params);
|
||||||
|
|
||||||
|
|
||||||
//void deleteRelevantById(Integer produceProcessId, CurrentUser currentUser);
|
//void deleteRelevantById(Integer produceProcessId, CurrentUser currentUser);
|
||||||
|
@ -112,10 +112,10 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
//@Override
|
||||||
public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
|
//public List<Integer> processStepListByProdprocid(ProductProcessParams params) {
|
||||||
return mtAloneProcessMapper.processStepListByProdprocid(params);
|
// return mtAloneProcessMapper.processStepListByProdprocid(params);
|
||||||
}
|
//}
|
||||||
|
|
||||||
//设置下一道工序的前道工序处理状态
|
//设置下一道工序的前道工序处理状态
|
||||||
public void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess) {
|
public void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess) {
|
||||||
|
@ -28,8 +28,13 @@ public class ProductProcessBatchDetServiceImpl extends AbstractService<ProductPr
|
|||||||
return productProcessBatchDetMapper.findList(params);
|
return productProcessBatchDetMapper.findList(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//@Override
|
||||||
|
//public List<String> volumeStepListByProdprocid(ProductProcessParams params) {
|
||||||
|
// return productProcessBatchDetMapper.volumeStepListByProdprocid(params);
|
||||||
|
//}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> volumeStepListByProdprocid(ProductProcessParams params) {
|
public List<ProductProcessBatchDet> findListByProductProcess(ProductProcessParams params) {
|
||||||
return productProcessBatchDetMapper.volumeStepListByProdprocid(params);
|
return productProcessBatchDetMapper.findListByProductProcess(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -267,15 +265,15 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
|
|||||||
productProcessBatchDetService.save(productProcessBatchDetList);
|
productProcessBatchDetService.save(productProcessBatchDetList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
//@Override
|
||||||
public ProcessStepAndVolumeNum stepAndNumByProdprocid(ProductProcessParams params) {
|
//public ProcessAndDet stepAndNumByProdprocid(ProductProcessParams params) {
|
||||||
ProcessStepAndVolumeNum processStepAndVolumeNum = new ProcessStepAndVolumeNum();
|
// ProcessAndDet processAndDet = new ProcessAndDet();
|
||||||
List<Integer> processStepList = processService.processStepListByProdprocid(params);
|
// List<Integer> processStepList = processService.processStepListByProdprocid(params);
|
||||||
List<String> volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params);
|
// List<String> volumeStepList = productProcessBatchDetService.volumeStepListByProdprocid(params);
|
||||||
processStepAndVolumeNum.setProcessStepList(processStepList);
|
// processAndDet.setProcessStepList(processStepList);
|
||||||
processStepAndVolumeNum.setVolumeStepList(volumeStepList);
|
// processAndDet.setVolumeStepList(volumeStepList);
|
||||||
return processStepAndVolumeNum;
|
// return processAndDet;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
//@Override
|
//@Override
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.deer.wms.produce.manage.web;
|
package com.deer.wms.produce.manage.web;
|
||||||
|
|
||||||
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
|
import com.deer.wms.produce.manage.model.ProductProcessBatchDetParams;
|
||||||
|
import com.deer.wms.produce.manage.model.ProductProcessParams;
|
||||||
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;
|
||||||
@ -28,7 +29,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Created by on 2019/09/09.
|
* Created by on 2019/09/09.
|
||||||
*/
|
*/
|
||||||
@Api(description = "xxx接口")
|
@Api(description = "批次明细接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/product/process/batch/dets")
|
@RequestMapping("/product/process/batch/dets")
|
||||||
public class ProductProcessBatchDetController {
|
public class ProductProcessBatchDetController {
|
||||||
@ -72,21 +73,25 @@ public class ProductProcessBatchDetController {
|
|||||||
return ResultGenerator.genSuccessResult(productProcessBatchDet);
|
return ResultGenerator.genSuccessResult(productProcessBatchDet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
/**
|
||||||
public Result list(ProductProcessBatchDetParams params, @ApiIgnore @User CurrentUser currentUser) {
|
* hy正在用(打卷系统)
|
||||||
|
* 获取批次加工单下的所有明细
|
||||||
|
* @param params
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/listByProductProcess")
|
||||||
|
public Result listByProductProcess(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
if(currentUser==null){
|
if(currentUser==null){
|
||||||
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentUser.getCompanyType() != SystemManageConstant.COMPANY_TYPE_MT){
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
params.setCompanyId(currentUser.getCompanyId());
|
|
||||||
}else{
|
|
||||||
params.setCompanyId(null);
|
|
||||||
}
|
|
||||||
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
List<ProductProcessBatchDet> list = productProcessBatchDetService.findList(params);
|
List<ProductProcessBatchDet> list = productProcessBatchDetService.findListByProductProcess(params);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
return ResultGenerator.genSuccessResult(pageInfo);
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import com.deer.wms.intercept.annotation.Authority;
|
|||||||
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;
|
||||||
import com.deer.wms.produce.manage.model.*;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
|
import com.deer.wms.produce.manage.service.MtAloneProcessService;
|
||||||
import com.deer.wms.produce.manage.service.ProcessBomService;
|
import com.deer.wms.produce.manage.service.ProcessBomService;
|
||||||
|
import com.deer.wms.produce.manage.service.ProductProcessBatchDetService;
|
||||||
import com.deer.wms.produce.manage.service.ProductProcessService;
|
import com.deer.wms.produce.manage.service.ProductProcessService;
|
||||||
import com.deer.wms.project.seed.annotation.OperateLog;
|
import com.deer.wms.project.seed.annotation.OperateLog;
|
||||||
import com.deer.wms.project.seed.core.result.CommonCode;
|
import com.deer.wms.project.seed.core.result.CommonCode;
|
||||||
@ -37,7 +39,10 @@ public class ProductProcessController {
|
|||||||
private ProductProcessService productProcessService;
|
private ProductProcessService productProcessService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProcessBomService processBomService;
|
private MtAloneProcessService processService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductProcessBatchDetService productProcessBatchDetService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy暂时没用
|
* hy暂时没用
|
||||||
@ -238,27 +243,32 @@ public class ProductProcessController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hy正在用(打卷系统)
|
* hy正在用(打卷系统)
|
||||||
* 根据批次加工单id获取其下的卷号和工序
|
* 根据批次加工单id获取其下所有的工序和明细
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "批次生产加工单下的工序和卷号查询", notes = "批次生产加工单下的工序和卷号查询")
|
@ApiOperation(value = "批次生产加工单下的工序和明细查询", notes = "批次生产加工单下的工序和卷号查询")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "productProcessId", value = "批次生产加工单id", paramType = "query", dataType = "int", required = true),
|
@ApiImplicitParam(name = "productProcessId", value = "批次生产加工单id", paramType = "query", dataType = "int", required = true),
|
||||||
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
||||||
})
|
})
|
||||||
@OperateLog(description = "批次生产加工单下的工序和卷号查询", type = "查询")
|
@OperateLog(description = "批次生产加工单下的工序和卷号查询", type = "查询")
|
||||||
@GetMapping("/step/and/num/by/prodprocid")
|
@GetMapping("/processAndDetByProductProcess")
|
||||||
public Result stepAndNumByProdprocid(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
public Result processAndDetByProductProcess(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
//if(currentUser==null){
|
if(currentUser==null){
|
||||||
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
//}
|
}
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
ProcessStepAndVolumeNum processStepAndVolumeNum = productProcessService.stepAndNumByProdprocid(params);
|
ProcessAndDet processAndDet = new ProcessAndDet();
|
||||||
return ResultGenerator.genSuccessResult(processStepAndVolumeNum);
|
//获取工序
|
||||||
|
List<MtAloneProcessVo> processVoList = processService.findProcessVoListByProductProcess(params);
|
||||||
|
//获取明细
|
||||||
|
List<ProductProcessBatchDet> productProcessBatchDetList = productProcessBatchDetService.findListByProductProcess(params);
|
||||||
|
processAndDet.setProcessVoList(processVoList);
|
||||||
|
processAndDet.setProductProcessBatchDetList(productProcessBatchDetList);
|
||||||
|
return ResultGenerator.genSuccessResult(processAndDet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle