From 34aafe30953d89580449ba1abee59b362dc76505 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Sat, 20 Apr 2024 15:20:39 +0800 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=E9=80=80=E6=96=99=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E9=80=80=E6=96=99=E5=AE=A1=E6=A0=B8-?= =?UTF-8?q?=E5=B7=A5=E6=9C=BA=E5=85=B7=E7=B1=BB=E5=9E=8B=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../claimAndRefund/return/returnExamine.vue | 35 +++++++++-------- .../views/claimAndRefund/return/returnIn.vue | 38 ++++++++++--------- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/sgzb-ui/src/views/claimAndRefund/return/returnExamine.vue b/sgzb-ui/src/views/claimAndRefund/return/returnExamine.vue index 8357d056..ef28f518 100644 --- a/sgzb-ui/src/views/claimAndRefund/return/returnExamine.vue +++ b/sgzb-ui/src/views/claimAndRefund/return/returnExamine.vue @@ -41,18 +41,12 @@ - + { + this.deptList = response.data + }) + }, // 取消按钮 cancel() { this.open = false @@ -595,6 +597,7 @@ export default { this.timeRange = [] // this.resetForm("queryForm"); this.$refs.queryForm.resetFields() + this.$refs.mychildSon.inputValue = '' this.initSelectData() this.handleQuery() }, @@ -795,7 +798,9 @@ export default { this.getList() }) }, - handleNodeClick(ev) {}, + selectDrop(value) { + this.queryParams.typeId = value + }, initSelectData() { this.GetUnitData() this.GetProData() diff --git a/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue b/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue index 5d171155..13d70856 100644 --- a/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue +++ b/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue @@ -62,19 +62,12 @@ /> - - + @@ -205,9 +198,11 @@ import { getInfo } from "@/api/login"; import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js" import dialogForm from "./dialogFormExame.vue"; + import { listPartTypeApi } from '@/api/repairTest/repair' + import Tree from './tree.vue' export default { // name: "ReturnExamine", - components: { dialogForm, }, + components: { dialogForm, Tree }, data() { return { type: '', @@ -248,7 +243,7 @@ endTime: '' }, companyId: '', - deptOptions: [], + deptList: [], unitList: [], proList: [], taskStatusList: [ @@ -279,6 +274,7 @@ created() { this.initSelectData() this.InitIGetInfo() + this.getTree() }, methods: { InitIGetInfo() { @@ -287,9 +283,15 @@ this.getList(); }) }, + getTree() { + listPartTypeApi().then((response) => { + console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data); + this.deptList = response.data + }) + }, //机具类型下拉点击 - handleNodeClick(ev) { - + selectDrop(value) { + this.queryParams.typeId = value }, //获取渲染下拉数据 initSelectData() { @@ -367,8 +369,8 @@ resetQuery() { this.dateRange = []; // this.resetForm("queryForm"); - this.$refs.queryForm.resetFields() + this.$refs.mychildSon.inputValue = '' this.initSelectData() this.handleQuery(); }, From 06ad1af47d10f6c66cf5e869b70b2dc00d17efa0 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Sat, 20 Apr 2024 15:34:19 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?-=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=85=A5=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/system/user/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/system/user/index.vue b/sgzb-ui/src/views/system/user/index.vue index 896d2e87..d3ba2c98 100644 --- a/sgzb-ui/src/views/system/user/index.vue +++ b/sgzb-ui/src/views/system/user/index.vue @@ -922,7 +922,7 @@ } else { this.$alert( "
" + - '导入失败' + + '导入失败: ' + response.msg + '
', '导入结果', { dangerouslyUseHTMLString: true }, From f2fe0437386fa721a680504ae065fa9321a79656 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Sat, 20 Apr 2024 15:57:47 +0800 Subject: [PATCH 3/7] =?UTF-8?q?fix:=20=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E4=B8=8B=E6=8B=89=E6=A1=86=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/base/comeAndGo/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/base/comeAndGo/index.vue b/sgzb-ui/src/views/base/comeAndGo/index.vue index 6428a798..5b44c39c 100644 --- a/sgzb-ui/src/views/base/comeAndGo/index.vue +++ b/sgzb-ui/src/views/base/comeAndGo/index.vue @@ -183,6 +183,7 @@ :options="deptOptions" placeholder="请选择所属上级" @select="select" + @input="resetValidation" />
@@ -265,7 +266,7 @@ export default { { required: true, message: "单位名称不能为空", trigger: "blur" } ], typeId: [ - { required: true, message: "单位类型不能为空", trigger: "blur" } + { required: true, message: "单位类型不能为空", trigger: "change" } ], deptId: [ { required: true, message: "所属上级不能为空", trigger: "blur" } @@ -302,6 +303,9 @@ export default { // console.log(row.label) this.form.deptName = row.label; }, + resetValidation() { + this.$refs.form.clearValidate('deptId') + }, //更新 changeStatus(row) { let param = { From 07c77c5ad388e321e994704fa9a67fdbe8fc7bc6 Mon Sep 17 00:00:00 2001 From: mashuai Date: Sat, 20 Apr 2024 16:01:30 +0800 Subject: [PATCH 4/7] bug --- .../src/main/resources/mapper/app/BackReceiveMapper.xml | 2 +- .../src/main/resources/mapper/base/BmProjectInfoMapper.xml | 2 +- .../src/main/resources/mapper/base/BmProjectLotMapper.xml | 2 +- .../src/main/resources/mapper/base/BmUnitInfoMapper.xml | 2 +- .../src/main/resources/mapper/base/SysDicMapper.xml | 2 +- .../java/com/bonus/sgzb/material/domain/BackApplyInfo.java | 2 +- .../src/main/resources/mapper/material/BackApplyMapper.xml | 5 ++++- 7 files changed, 10 insertions(+), 7 deletions(-) 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 c68c22b4..d167c265 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 @@ -601,7 +601,7 @@ tt.task_status AS taskStatus, sd.`name` AS taskName, tta.agreement_id AS agreementId, - GROUP_CONCAT( DISTINCT bad.type_id ) AS typeId, + GROUP_CONCAT( DISTINCT mt2.type_id ) AS typeId, GROUP_CONCAT(bad.id) as badId, GROUP_CONCAT( mt2.type_name, '' ) AS typeName FROM diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml index 61ff5b82..6d60f3df 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectInfoMapper.xml @@ -141,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectLotMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectLotMapper.xml index b2589849..3ef03929 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectLotMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmProjectLotMapper.xml @@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmUnitInfoMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmUnitInfoMapper.xml index 9cc45fb4..8be2b53e 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmUnitInfoMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/BmUnitInfoMapper.xml @@ -174,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml index d753cde6..68cd0405 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/SysDicMapper.xml @@ -66,7 +66,7 @@ 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 76c3b1c8..5d6f022d 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 @@ -126,7 +126,7 @@ public class BackApplyInfo extends BaseEntity { @ApiModelProperty(value = "协议编号") private String agreementCode; - @Excel(name = "退料状态" , readConverterExp = "37=待退料审核,38=退料已审核,39=退料核查中,40=退料完成") + @Excel(name = "退料状态" , readConverterExp = "37=待退料审核,38=退料已审核,39=退料核查中,40=退料完成,101 = 退料审核驳回") @ApiModelProperty(value = "任务状态") private String taskStatus; diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml index f00f4267..95372d86 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml @@ -649,7 +649,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tta.agreement_id as agreementId, GROUP_CONCAT(bai.company_id) as companyId, GROUP_CONCAT(bad.id) as badId, - GROUP_CONCAT(DISTINCT bad.type_id) as typeId, + GROUP_CONCAT(DISTINCT mt2.type_id) as typeId, GROUP_CONCAT(mt2.type_name) AS typeName, GROUP_CONCAT(bad.status) AS status FROM @@ -692,6 +692,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time + + HAVING FIND_IN_SET(#{typeId}, typeId) > 0 + ORDER BY bai.create_time desc From 45d551f864bf336aec108479860112bdcfb7afda Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Sat, 20 Apr 2024 16:42:41 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix:=20=E5=B2=97=E4=BD=8D=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/system/post/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/system/post/index.vue b/sgzb-ui/src/views/system/post/index.vue index 459d16b4..41deaf64 100644 --- a/sgzb-ui/src/views/system/post/index.vue +++ b/sgzb-ui/src/views/system/post/index.vue @@ -115,7 +115,7 @@ @selection-change="handleSelectionChange" > - + @@ -209,6 +209,8 @@ v-model="form.remark" type="textarea" placeholder="请输入内容" + maxlength="100" + show-word-limit /> From c180ad60e72ea90e0f82334e9fb08c4ca2e2cd2e Mon Sep 17 00:00:00 2001 From: hayu <1604366271@qq.com> Date: Sat, 20 Apr 2024 16:58:15 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PurchaseInputController.java | 12 +- .../sgzb/app/domain/PurchaseMacodeInfo.java | 12 ++ .../sgzb/app/mapper/PurchaseInputMapper.java | 58 +++++++- .../app/service/PurchaseInputService.java | 14 ++ .../impl/PurchaseInputServiceImpl.java | 103 ++++++++------ .../mapper/app/PurchaseInputMapper.xml | 127 ++++++++++++++---- .../material/PurchaseCheckInfoMapper.xml | 20 +-- .../material/PurchaseMacodeInfoMapper.xml | 7 +- 8 files changed, 268 insertions(+), 85 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/PurchaseInputController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/PurchaseInputController.java index f4ff8589..9eff1a40 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/PurchaseInputController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/PurchaseInputController.java @@ -10,9 +10,11 @@ import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.core.web.page.TableDataInfo; import com.bonus.sgzb.common.log.annotation.Log; import com.bonus.sgzb.common.log.enums.BusinessType; +import com.bonus.sgzb.common.security.utils.SecurityUtils; import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; /** @@ -36,7 +38,15 @@ public class PurchaseInputController extends BaseController { @GetMapping("list") public AjaxResult getbackReceiveList(PurchaseCheckInfo bean) { try { - List list =purchaseInputService.getList(bean); + List list = new ArrayList<>(); + //判断该组织是否开启综合服务中心审核 + Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); + int re = purchaseInputService.selectExamineType(companyId); + if (re>0){ + list = purchaseInputService.selectPutInListExamine(bean); + }else { + list =purchaseInputService.getList(bean); + } return success(list); } catch (Exception e) { throw new RuntimeException(e); diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/PurchaseMacodeInfo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/PurchaseMacodeInfo.java index 26c9996b..ca8d5021 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/PurchaseMacodeInfo.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/PurchaseMacodeInfo.java @@ -94,6 +94,10 @@ public class PurchaseMacodeInfo extends BaseEntity @ApiModelProperty(value = "固定资产编码") private String assetsCode; + /** 管理方式 */ + @ApiModelProperty(value = "管理方式") + private String manageType; + @ApiModelProperty(value = "采购时间") private String purchaseTime; @@ -301,6 +305,14 @@ public class PurchaseMacodeInfo extends BaseEntity this.statusFlag = statusFlag; } + public String getManageType() { + return manageType; + } + + public void setManageType(String manageType) { + this.manageType = manageType; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/PurchaseInputMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/PurchaseInputMapper.java index af236715..90ae653f 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/PurchaseInputMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/PurchaseInputMapper.java @@ -25,12 +25,12 @@ public interface PurchaseInputMapper { List selectPutInListList(PurchaseCheckInfo bean); /** - * 查询 + * 查询新购入库任务列表 * * @param taskId 查询条件 * @return 结果 */ - String selectTypeNameByTaskId(Long taskId); + String selectTypeNameByTaskId(@Param("taskId") Long taskId,@Param("type") String type); /** * 查询 @@ -70,7 +70,7 @@ public interface PurchaseInputMapper { * @param typeId 查询条件 * @return 结果 */ - BigDecimal selectInputNUmByTypeId(@Param("taskId") Long taskId, @Param("typeId") Long typeId); + BigDecimal selectInputNumByTypeId(@Param("taskId") Long taskId, @Param("typeId") Long typeId); /** * 修改 @@ -131,4 +131,56 @@ public interface PurchaseInputMapper { * @return */ int selectPurchaseCheckDetailsStatus(Long taskId); + + /** + * 删除ma_machine表 + * @param maId + * @return 结果 + */ + int deleteMaMachineInfoByMaId(Long maId); + + /** + * 删除ma_machine_label表 + * @param maId + * @return int + */ + int deleteMaMachineLabelByMaId(Long maId); + + /** + * 删除ma_label_bind表 + * @param maId + * @return int + */ + int deleteMaLabelBindByMaId(Long maId); + + /** + * 删除purchase_macode_info表 + * @param taskId + * @param typeId + * @param maCode + * @return + */ + int updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(@Param("taskId") Long taskId,@Param("typeId") Long typeId,@Param("maCode") String maCode); + + /** + * 修改purchase_check_details表 + * @param typeId + * @param taskId + * @return int + */ + int updatePurchaseCheckDetailsByTaskId(@Param("taskId") Long taskId,@Param("typeId") Long typeId); + + /** + * 查询组织是否开启审核 + * @param companyId + * @return int + */ + int selectExamineType(Long companyId); + + /** + * 查询 + * @param bean + * @return + */ + List selectPutInListExamine(PurchaseCheckInfo bean); } \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/PurchaseInputService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/PurchaseInputService.java index b3983809..dcfc7f5b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/PurchaseInputService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/PurchaseInputService.java @@ -35,4 +35,18 @@ public interface PurchaseInputService { * @return 修改结果 */ int modifyManageStatus(MaInputVO maInputVO); + + /** + * 查询组织是否开启审核 + * @param companyId + * @return int + */ + int selectExamineType(Long companyId); + + /** + * 查询新购入库任务列表 + * @param bean + * @return + */ + List selectPutInListExamine(PurchaseCheckInfo bean); } diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/PurchaseInputServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/PurchaseInputServiceImpl.java index 02ce3364..b4a9d018 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/PurchaseInputServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/PurchaseInputServiceImpl.java @@ -29,7 +29,7 @@ public class PurchaseInputServiceImpl implements PurchaseInputService { public List getList(PurchaseCheckInfo bean) { List purchaseCheckInfos = purchaseInputMapper.selectPutInListList(bean); for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) { - String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId()); + String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"2"); checkInfo.setPurchasingTypeName(typeName); } return purchaseCheckInfos; @@ -51,76 +51,91 @@ public class PurchaseInputServiceImpl implements PurchaseInputService { MaMachine maMachine = new MaMachine(); maMachine.setMaId(maInputRecord.getMaId()); maMachine.setMaCode(maInputRecord.getMaCode()); - maMachine.setMaStatus("1".equals(checkResult) ? "15":"14"); - purchaseInputMapper.updateMaMachine(maMachine); + + //修改编码管理表入库状态 + PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo(); + purchaseMacodeInfo.setTaskId(taskId); + purchaseMacodeInfo.setTypeId(typeId); + purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode()); + // 修改验收任务详细表入库数量 if ("1".equals(checkResult)) { + //修改机具状态为在库 + maMachine.setMaStatus("15"); + purchaseInputMapper.updateMaMachine(maMachine); + + // 修改编码管理的入库状态 MaType maType = purchaseInputMapper.selectTypeByTypeId(typeId); // 库存添加 - maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum()) - .add(maType.getNum() == null ? new BigDecimal(0):maType.getNum())); + maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum()) + .add(maType.getNum() == null ? new BigDecimal(0) : maType.getNum())); purchaseInputMapper.updateTypeByTypeId(maType); - BigDecimal inputNum = purchaseInputMapper.selectInputNUmByTypeId(taskId, typeId); + + BigDecimal inputNum = purchaseInputMapper.selectInputNumByTypeId(taskId, typeId); PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails(); purchaseCheckDetails.setTaskId(taskId); purchaseCheckDetails.setTypeId(typeId); - purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum())); + purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum())); purchaseCheckDetails.setStatus(4); purchaseInputMapper.updateByTaskIdTypeId(purchaseCheckDetails); + // 新增入库任务详细表 InputApplyDetails applyDetails = new InputApplyDetails(); applyDetails.setTaskId(taskId); applyDetails.setTypeId(typeId); - applyDetails.setInputNum(maInputRecord.getInputNum() == null ? new BigDecimal(0):maInputRecord.getInputNum()); + applyDetails.setInputNum(maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum()); applyDetails.setMaId(maInputRecord.getMaId()); applyDetails.setInputType("1"); applyDetails.setCreateTime(new Date()); applyDetails.setCreateBy(SecurityUtils.getUsername()); applyDetails.setCompanyId(maInputRecord.getCompanyId()); purchaseInputMapper.insertInputApplyDetails(applyDetails); + + purchaseMacodeInfo.setStatus("1"); + purchaseInputMapper.updateMacodeByType(purchaseMacodeInfo); + + // 新增入库记录 + purchaseInputMapper.insertMaInputRecord(maInputRecord); + } else { + //删除ma_machine表 + purchaseInputMapper.deleteMaMachineInfoByMaId(maInputRecord.getMaId()); + //删除ma_machine_label表 + purchaseInputMapper.deleteMaMachineLabelByMaId(maInputRecord.getMaId()); + //删除ma_label_bind表 + purchaseInputMapper.deleteMaLabelBindByMaId(maInputRecord.getMaId()); + //修改purchase_macode_info表 + purchaseInputMapper.updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(taskId, typeId, maInputRecord.getMaCode()); + //修改purchase_check_details表 + purchaseInputMapper.updatePurchaseCheckDetailsByTaskId(taskId, typeId); } - // 修改编码管理表入库状态 - PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo(); - purchaseMacodeInfo.setTaskId(taskId); - purchaseMacodeInfo.setTypeId(typeId); - purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode()); - purchaseMacodeInfo.setStatus("1".equals(checkResult) ? "1" : "0"); - purchaseInputMapper.updateMacodeByType(purchaseMacodeInfo); - // 新增入库记录 - purchaseInputMapper.insertMaInputRecord(maInputRecord); } //判断是否全部已操作(通过或不通过) int count=purchaseInputMapper.isOperateAll(taskId); if (count<=0){ - //是否为全部不通过 - int count1 = purchaseInputMapper.selectPurchaseCheckDetailsStatus(taskId); - if (count1>0){ - TmTask task = new TmTask(); - task.setTaskId(taskId); - task.setTaskStatus(28); - task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - task.setUpdateTime(DateUtils.getNowDate()); - purchaseInputMapper.updateTmTask(task); - }else { - TmTask task = new TmTask(); - task.setTaskId(taskId); - task.setTaskStatus(107); - task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); - task.setUpdateTime(DateUtils.getNowDate()); - purchaseInputMapper.updateTmTask(task); - } + //全部审核任务状态改为已审核 + TmTask task = new TmTask(); + task.setTaskId(taskId); + task.setTaskStatus(28); + task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); + task.setUpdateTime(DateUtils.getNowDate()); + purchaseInputMapper.updateTmTask(task); } -// // 当全部为已入库的时候任务改为入库状态 -// Integer count = purchaseInputMapper.selectMacodeInfoStatusByTaskId(taskId); -// if (count <= 0) { -// TmTask task = new TmTask(); -// task.setTaskId(taskId); -// task.setTaskStatus(28); -// task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid())); -// task.setUpdateTime(DateUtils.getNowDate()); -// purchaseInputMapper.updateTmTask(task); -// } return 1; } + + @Override + public int selectExamineType(Long companyId) { + return purchaseInputMapper.selectExamineType(companyId); + } + + @Override + public List selectPutInListExamine(PurchaseCheckInfo bean) { + List purchaseCheckInfos = purchaseInputMapper.selectPutInListExamine(bean); + for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) { + String typeName = purchaseInputMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"3"); + checkInfo.setPurchasingTypeName(typeName); + } + return purchaseCheckInfos; + } } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml index cc48414f..045d3a51 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml @@ -111,22 +111,45 @@ where task_id = #{taskId} + + update + purchase_macode_info + set status='2' + where ma_code = #{maCode} + and task_id = #{taskId} + and type_id = #{typeId} + + + update purchase_check_details set bind_num = bind_num - 1 , status='5' where task_id = #{taskId} and type_id = #{typeId} + + + + delete from ma_machine where ma_id = #{maId} + + + delete from ma_machine_label where ma_id = #{maId} + + + delete from ma_label_bind where ma_id = #{maId} + - select IFNULL(input_num,0) from purchase_check_details where task_id = #{taskId} and type_id = #{typeId} + + \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index 6eb29b43..bdbed675 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -164,32 +164,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"