diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index 39f5dcc3..4d1755c9 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -203,6 +203,12 @@ public class MaType extends BaseEntity { @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children = new ArrayList<>(); + /** + * 厂家规格型号 + */ + @ApiModelProperty(value = "厂家规格型号") + private String facModel; + public Long getTypeId() { @@ -550,4 +556,12 @@ public class MaType extends BaseEntity { public void setFinalPrice(String finalPrice) { this.finalPrice = finalPrice; } + + public String getFacModel() { + return facModel; + } + + public void setFacModel(String facModel) { + this.facModel = facModel; + } } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java index 3b0e47f1..75bb60b3 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java @@ -13,6 +13,7 @@ import java.util.List; /** * 退料接收-app + * * @author bns_han */ @RestController @@ -32,8 +33,14 @@ public class BackReceiveController extends BaseController { @GetMapping("getbackReceiveList") public AjaxResult getbackReceiveList(BackApplyInfo record) { try { - List list = backReceiveService.getbackReceiveList(record); - return success(list); + if (record.getFlag() == 0) { + List list = backReceiveService.getbackReceiveList(record); + return success(list); + } else { + startPage(); + List list = backReceiveService.getbackReceiveList(record); + return success(getDataTable(list)); + } } catch (Exception e) { throw new RuntimeException(e); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java index 092a459d..bd12c738 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/BackApplyInfo.java @@ -51,6 +51,10 @@ public class BackApplyInfo { * 类型名称 */ private String typeName; + /** + * 协议号 + */ + private String agreementCode; /** * 规格编号 */ @@ -159,4 +163,7 @@ public class BackApplyInfo { * 退料数量 */ private String preNum; + private String startTime; + private String endTime; + private Integer flag; } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml index a9eb290b..dc5f40af 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackReceiveMapper.xml @@ -583,35 +583,69 @@ SELECT bai.id, bai.`code`, - bai.task_id as taskId, - bai.back_person as backPerson, + bai.task_id AS taskId, + bai.back_person AS backPerson, bai.phone, bpl.lot_id, - bpl.lot_name as lotName, - bui.unit_id as unitId, - bui.unit_name as unitName, - bai.back_time as backTime, - tt.task_status as taskStatus, - tta.agreement_id as agreementId, - GROUP_CONCAT(DISTINCT bad.type_id) as typeId, - GROUP_CONCAT(mt2.type_name, '') AS typeName + bpl.lot_name AS lotName, + bui.unit_id AS unitId, + bui.unit_name AS unitName, + bai.back_time AS backTime, + bagi.agreement_code AS agreementCode, + tt.task_status AS taskStatus, + sd.`name` AS taskName, + tta.agreement_id AS agreementId, + GROUP_CONCAT( DISTINCT bad.type_id ) AS typeId, + GROUP_CONCAT( mt2.type_name, '' ) AS typeName FROM back_apply_info bai - LEFT JOIN back_apply_details bad on bad.parent_id=bai.id - LEFT JOIN tm_task tt on tt.task_id=bai.task_id - LEFT JOIN tm_task_agreement tta on tta.task_id=tt.task_id - LEFT JOIN bm_agreement_info bagi on bagi.agreement_id=tta.agreement_id - LEFT JOIN bm_project_lot bpl on bpl.lot_id=bagi.project_id - LEFT JOIN bm_unit_info bui on bui.unit_id=bagi.unit_id - LEFT JOIN sys_user us on us.user_id=bai.create_by - LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id - LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id - LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id - LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id + LEFT JOIN back_apply_details bad ON bad.parent_id = bai.id + LEFT JOIN tm_task tt ON tt.task_id = bai.task_id + LEFT JOIN tm_task_agreement tta ON tta.task_id = tt.task_id + LEFT JOIN bm_agreement_info bagi ON bagi.agreement_id = tta.agreement_id + LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bagi.project_id + LEFT JOIN bm_unit_info bui ON bui.unit_id = bagi.unit_id + LEFT JOIN sys_user us ON us.user_id = bai.create_by + LEFT JOIN ma_type mt1 ON mt1.type_id = bad.type_id + LEFT JOIN ma_type mt2 ON mt2.type_id = mt1.parent_id + LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id + LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id + LEFT JOIN sys_dic sd ON sd.id = tt.task_status WHERE - tt.task_status in (38,39,40) - GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time - ORDER BY tt.task_status asc ,bai.create_time desc + tt.task_status IN ( 37, 38, 39, 40 ) + + and (bai.code like concat('%', #{keyWord}, '%') or + bagi.agreement_code like concat('%', #{keyWord}, '%')) + + + and bui.unit_id = #{unitId} + + + and bpl.lot_id = #{lotId} + + + and bagi.agreement_code like concat('%', #{agreementCode}, '%') + + + and tt.task_status = #{taskStatus} + + + AND bai.back_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + + GROUP BY + bai.id, + us.user_name, + bai.phone, + bpl.lot_name, + bui.unit_name, + bagi.plan_start_time + + HAVING + FIND_IN_SET(#{typeId}, GROUP_CONCAT(DISTINCT bad.type_id)) + + ORDER BY + tt.task_status ASC, + bai.create_time DESC - select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.manage_type, + select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id,m.unit_name, m.manage_type, m.lease_price, m.eff_time, m.rent_price, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load, m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl, mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, - su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName, mpi.prop_name, + su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName, m.del_flag, m.create_by, m.create_time, - m.remark, m.company_id + m.remark, m.company_id,m.fac_model as facModel from ma_type m left join ma_prop_set mps on m.type_id = mps.type_id left join ma_prop_info mpi on mps.prop_id = mpi.prop_id @@ -334,7 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl, mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, su.nick_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time, - m.remark, m.company_id + m.remark, m.company_id,m.fac_model as facModel from ma_type m left join ma_prop_set mps on m.type_id = mps.type_id left join ma_prop_info mpi on mps.prop_id = mpi.prop_id diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java index 34c90e1e..ac6e3c6b 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java @@ -84,11 +84,17 @@ public class BackApplyController extends BaseController { */ @ApiOperation(value = "退料申请(查看)") @GetMapping("/getViewByApply") - public TableDataInfo getViewByApply(BackApplyInfo bean) { - startPage(); - bean.setFlag(0); - List list = backApplyService.getViewByApply(bean); - return getDataTable(list); + public AjaxResult getViewByApply(BackApplyInfo bean) { + if (bean.getViewWeb() == 1) { + bean.setFlag(0); + List list = backApplyService.getViewByApply(bean); + return AjaxResult.success(list); + } else { + startPage(); + bean.setFlag(0); + List list = backApplyService.getViewByApply(bean); + return AjaxResult.success(getDataTable(list)); + } } /** diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java index e9394e3b..ded459e7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java @@ -245,4 +245,6 @@ public class BackApplyInfo extends BaseEntity { /** 前端条件查询所传退料时间 */ private String time; + private int viewWeb; + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java index 6f177e79..28da051c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/InventoryAndWarehousingServiceImpl.java @@ -86,7 +86,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi } } catch (Exception e) { log.error("保存入库盘点异常:{}",e.getMessage()); - // 添加事务回滚逻辑 + // 添加事务回滚逻辑,保证入库全部成功或者全部失败 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return AjaxResult.error(ExceptionEnum.SAVE_TO_DATABASE.getCode(), ExceptionEnum.SAVE_TO_DATABASE.getMsg()); } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml index 9be81e9f..28b90587 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/StorageStatusMapper.xml @@ -85,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id WHERE mt.`level` = 4 + and mt.del_flag = '0' and mt2.type_name like concat('%',#{typeName},'%') diff --git a/sgzb-ui/src/views/store/warehousing/putInStore.vue b/sgzb-ui/src/views/store/warehousing/putInStore.vue index d564a797..b5163d6a 100644 --- a/sgzb-ui/src/views/store/warehousing/putInStore.vue +++ b/sgzb-ui/src/views/store/warehousing/putInStore.vue @@ -278,9 +278,9 @@ - + - + - + - +