From 12fa25b6053f684555543950e25d70b400ed7d1b Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Thu, 13 Nov 2025 14:04:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/base/api/domain/BackApplyInfo.java | 10 +++--- .../base/api/domain/SltAgreementInfo.java | 5 +++ .../app/controller/BackReceiveController.java | 2 +- .../controller/LeaseOutDetailsController.java | 13 ++++++++ .../sgzb/app/domain/LeaseApplyDetails.java | 5 +++ .../bonus/sgzb/app/domain/LeaseApplyInfo.java | 6 ++-- .../sgzb/app/domain/LeaseOutDetailRecord.java | 1 + .../com/bonus/sgzb/app/domain/TmTask.java | 32 +++++++++++-------- .../com/bonus/sgzb/app/domain/TmTaskVo.java | 20 ++++++------ .../app/mapper/LeaseApplyDetailsMapper.java | 2 ++ .../app/mapper/LeaseOutDetailsMapper.java | 1 + .../app/service/LeaseOutDetailsService.java | 2 ++ .../impl/LeaseOutDetailsServiceImpl.java | 8 +++-- .../app/service/impl/TmTaskServiceImpl.java | 14 +++++++- .../mapper/app/BackReceiveMapper.xml | 12 ++++--- .../mapper/app/LeaseApplyDetailsMapper.xml | 25 +++++++++++++-- .../mapper/app/LeaseOutDetailsMapper.xml | 4 +-- .../resources/mapper/app/TmTaskMapper.xml | 21 ++++++++---- .../mapper/base/MaLabelBindMapper.xml | 1 + .../material/SltAgreementInfoMapper.xml | 13 ++++++-- 20 files changed, 144 insertions(+), 53 deletions(-) diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/BackApplyInfo.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/BackApplyInfo.java index b7be859..88f35df 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/BackApplyInfo.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/BackApplyInfo.java @@ -93,7 +93,7 @@ public class BackApplyInfo extends BaseEntity { /** * 联系人 */ - @Excel(name = "联系电话",sort = 6) + @Excel(name = "联系电话",sort = 7) @ApiModelProperty(value = "联系电话") private String phone; /** @@ -105,7 +105,7 @@ public class BackApplyInfo extends BaseEntity { /** * 单位名称 */ - @Excel(name = "退料单位",sort = 2) + @Excel(name = "退料单位",sort = 4) @ApiModelProperty(value = "单位名称") private String unitName; /** @@ -120,7 +120,7 @@ public class BackApplyInfo extends BaseEntity { /** * 类型名称 */ - @Excel(name = "退料类型名称",sort = 4) + @Excel(name = "退料类型名称",sort = 5) @ApiModelProperty(value = "类型名称") private String typeName; /** @@ -142,12 +142,12 @@ public class BackApplyInfo extends BaseEntity { @ApiModelProperty(value = "退料单号") private String code; - @Excel(name = "退料人员",sort = 5) + @Excel(name = "退料人员",sort = 6) @ApiModelProperty(value = "退料人员") private String backPerson; - @Excel(name = "申请时间",sort = 7) + @Excel(name = "计划退料时间",sort = 2) @ApiModelProperty(value = "退料日期") @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java index df263d0..8e38258 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/SltAgreementInfo.java @@ -242,4 +242,9 @@ public class SltAgreementInfo { * 是否根据同类型最大结算时间得来(0:否,1:是) */ private Integer isMaxEndTime; + + private BigDecimal replaceLeasePrice; + + private Integer replaceTypeId; + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java index 0914081..89555da 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/BackReceiveController.java @@ -96,7 +96,7 @@ public class BackReceiveController extends BaseController { public void export(HttpServletResponse response, BackApplyInfo record) { List list = backReceiveService.getbackReceiveList(record); ExcelUtil util = new ExcelUtil(BackApplyInfo.class); - util.exportExcel(response, list, "领料接收数据"); + util.exportExcel(response, list, "退料接收数据"); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java index 84d10c8..c879ad7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/controller/LeaseOutDetailsController.java @@ -145,6 +145,19 @@ public class LeaseOutDetailsController extends BaseController { return AjaxResult.success(getDataTable(detailsByApplyId)); } + /** + * 数量出库列表(web) + * + * @param typeId 机具类型id + * @return 设备信息 + */ + @Log(title = "根据TypeId获取数量出库列表(web)", businessType = BusinessType.QUERY) + @GetMapping("/getDetailsByTypeIdNum") + public AjaxResult getDetailsByTypeIdNum(TmTask typeId) { + List detailsByApplyId = leaseOutDetailsService.getDetailsByTypeIdNum(typeId); + return AjaxResult.success(detailsByApplyId); + } + /** * 领料出库,对库存处理 * diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java index d767f4b..c4cb52c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java @@ -221,4 +221,9 @@ public class LeaseApplyDetails implements Serializable { private String isStorage; private List ctList; + + private String replaceTypeName; + + //是否以大代小(0否 1是) + private Integer isChange; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyInfo.java index 5c3f7e7..2497495 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyInfo.java @@ -178,7 +178,7 @@ public class LeaseApplyInfo implements Serializable { @ApiModelProperty(value="预领取时间") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date estimateLeaseTime; +// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") +// @JSONField(format = "yyyy-MM-dd HH:mm:ss") + private String estimateLeaseTime; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java index 163c400..681804a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseOutDetailRecord.java @@ -53,4 +53,5 @@ public class LeaseOutDetailRecord { //成套设备信息 private List maWholeVos; + private String replaceTypeName; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java index 097dd23..76871b8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java @@ -144,7 +144,7 @@ public class TmTask implements Serializable { * 备注 */ @ApiModelProperty(value = "备注") - @Excel(name = "备注", sort = 11) + @Excel(name = "备注", sort = 12) private String remark; /** @@ -202,7 +202,7 @@ public class TmTask implements Serializable { @ApiModelProperty(value = "往来单位id") private Long unitId; @ApiModelProperty(value = "往来单位") - @Excel(name = "领料单位", sort = 2) + @Excel(name = "领料单位", sort = 4) private String unitName; @ApiModelProperty(value = "工程id") @@ -218,34 +218,33 @@ public class TmTask implements Serializable { @ApiModelProperty(value = "协议编号") - @Excel(name = "协议号", sort = 4) + @Excel(name = "协议号", sort = 6) private String agreementCode; @ApiModelProperty(value = "领料人") - @Excel(name = "领料人", sort = 5) + @Excel(name = "领料人", sort = 7) private String leasePerson; @ApiModelProperty(value = "领料人手机号") - @Excel(name = "联系电话", sort = 6) + @Excel(name = "联系电话", sort = 8) private String leasePhone; @ApiModelProperty(value = "申请人") - @Excel(name = "申请人", sort = 7) + @Excel(name = "申请人", sort = 9) private String applyFor; @ApiModelProperty(value = "任务状态") - @Excel(name = "任务状态", sort = 9) + @Excel(name = "任务状态", sort = 10) private String taskName; @ApiModelProperty(value = "审批状态id") private String examineStatusId; @ApiModelProperty(value = "审批状态的备注") - @Excel(name = "审批结果", sort = 10) + @Excel(name = "审批意见", sort = 11) private String examineStatus; @ApiModelProperty(value = "创建时间") - @Excel(name = "申请时间", sort = 8) private String createTimes; @ApiModelProperty(value = "更新时间") @@ -270,7 +269,7 @@ public class TmTask implements Serializable { private String deptAuditRemark; @ApiModelProperty(value = "领用类型:0 工程租赁 1长期领用") - @Excel(name = "领料类型", readConverterExp = "0=工程租赁,1=长期租赁") + @Excel(name = "领料类型",sort=5, readConverterExp = "0=工程租赁,1=长期租赁") private String leaseType; private String userId; @@ -286,9 +285,10 @@ public class TmTask implements Serializable { private String typeId; private Integer partNum; @ApiModelProperty(value = "预计领料时间(重庆)") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date estimateLeaseTime; +// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Excel(name = "计划领料时间", sort = 2) + private String estimateLeaseTime; private Integer souceByRefuse; private int souceBy; @@ -329,7 +329,7 @@ public class TmTask implements Serializable { * 机具规格id * */ @ApiModelProperty(value = "以大代小id") - private long replaceTypeId; + private Integer replaceTypeId; @ApiModelProperty(value = "库管员id字符串") private String maTypeUserId; @@ -365,6 +365,10 @@ public class TmTask implements Serializable { @ApiModelProperty(value = "领料id") private Integer leaseId; + private String replaceTypeName; + + private Integer replaceNum; + public void setLeaseFee(BigDecimal leaseFee) { this.leaseFee = leaseFee; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java index 6f8a6c8..83d6267 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java @@ -73,7 +73,7 @@ public class TmTaskVo implements Serializable { * 领用类型 */ @ApiModelProperty(value = "领料类型") - @Excel(name = "领料类型", sort = 12, readConverterExp = "0=工程租赁,1=长期租赁") + @Excel(name = "领料类型", sort = 5, readConverterExp = "0=工程租赁,1=长期租赁") private String leaseType; /** @@ -109,7 +109,7 @@ public class TmTaskVo implements Serializable { * 备注 */ @ApiModelProperty(value = "备注") - @Excel(name = "备注", sort = 11) + @Excel(name = "备注", sort = 10) private String remark; /** @@ -155,7 +155,7 @@ public class TmTaskVo implements Serializable { @ApiModelProperty(value = "往来单位id") private Long unitId; @ApiModelProperty(value = "往来单位") - @Excel(name = "领料单位", sort = 2) + @Excel(name = "领料单位", sort = 4) private String unitName; @ApiModelProperty(value = "工程id") @@ -171,23 +171,22 @@ public class TmTaskVo implements Serializable { @ApiModelProperty(value = "协议编号") - @Excel(name = "协议号", sort = 4) + @Excel(name = "协议号", sort = 6) private String agreementCode; @ApiModelProperty(value = "领料人") - @Excel(name = "领料人", sort = 5) + @Excel(name = "领料人", sort = 7) private String leasePerson; @ApiModelProperty(value = "领料人手机号") - @Excel(name = "联系电话", sort = 6) + @Excel(name = "联系电话", sort = 8) private String leasePhone; @ApiModelProperty(value = "申请人") - @Excel(name = "申请人", sort = 7) + @Excel(name = "申请人", sort = 9) private String applyFor; @ApiModelProperty(value = "任务状态") - @Excel(name = "任务状态", sort = 9) private String taskName; @ApiModelProperty(value = "审批状态id") @@ -197,9 +196,12 @@ public class TmTaskVo implements Serializable { private String examineStatus; @ApiModelProperty(value = "创建时间") - @Excel(name = "申请时间", sort = 8) private String createTimes; + @ApiModelProperty(value = "计划预领时间") + @Excel(name = "计划预领时间", sort = 2) + private String estimateLeaseTime; + @ApiModelProperty(value = "更新时间") private String updateTimes; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseApplyDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseApplyDetailsMapper.java index d75c2c6..5339ce7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseApplyDetailsMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseApplyDetailsMapper.java @@ -54,6 +54,8 @@ public interface LeaseApplyDetailsMapper { List getDetailsByApplyId(TmTask typeId); + List getDetailsByTypeIdNum(TmTask typeId); + TmTask getOrderHead(String parentId); List getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java index d741bce..2164978 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/LeaseOutDetailsMapper.java @@ -127,4 +127,5 @@ public interface LeaseOutDetailsMapper { List getSltFeeList(TmTask bean); int checkUpdateRecords(TmTask bean); + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/LeaseOutDetailsService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/LeaseOutDetailsService.java index bd5dce1..7a27c93 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/LeaseOutDetailsService.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/LeaseOutDetailsService.java @@ -79,6 +79,8 @@ public interface LeaseOutDetailsService { List getDetailsByApplyId(TmTask id); + List getDetailsByTypeIdNum(TmTask id); + TmTask getLeaseOutOrder(String parentId,String typeId); int delMachineByRfid(MaMachine maMachine); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index 52442f7..d9b18b8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -202,6 +202,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { return leaseApplyDetailsMapper.getDetailsByApplyId(typeId); } + @Override + public List getDetailsByTypeIdNum(TmTask typeId) { + return leaseApplyDetailsMapper.getDetailsByTypeIdNum(typeId); + } + @Override public TmTask getLeaseOutOrder(String parentId, String typeId) { TmTask orderHead = leaseApplyDetailsMapper.getOrderHead(parentId); @@ -579,8 +584,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { } } else { // 普通机具减少 (ma_type 设备规格表)的库存数量 - res = leaseOutDetailsMapper.updateMaTypeStockNum(record); - + res = leaseOutDetailsMapper.updateMaTypeStockNum(record); } // 更新 (ma_machine 设备表)的状态 leaseOutDetailsMapper.updateMaMachineStatus(record); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 2d08ae9..0d46b8a 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -1364,7 +1364,7 @@ public class TmTaskServiceImpl implements TmTaskService { Long taskId = task.getTaskId(); if (CollUtil.isNotEmpty(leaseApplyDetails)) { for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) { - if (leaseApplyDetail.getPreNum() == null || leaseApplyDetail.getPreNum().equals(0)) { + if (leaseApplyDetail.getIsCt() == 1 && (leaseApplyDetail.getPreNum() == null || leaseApplyDetail.getPreNum().equals(0))) { throw new RuntimeException("请输入预领数量"); } LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo(); @@ -1376,9 +1376,21 @@ public class TmTaskServiceImpl implements TmTaskService { Integer id = leaseApplyInfos.getId(); if (leaseApplyDetail.getCompanyId() == null && leaseApplyInfos.getCompanyId() == null) { leaseApplyDetail.setParenntId(id); + if(leaseApplyDetail.getIsCt() != 0 && leaseApplyDetail.getReplaceTypeId() != null && leaseApplyDetail.getIsChange() == 1 ){ + Integer replaceTypeId = leaseApplyDetail.getReplaceTypeId(); + Integer typeId = leaseApplyDetail.getTypeId(); + leaseApplyDetail.setReplaceTypeId(typeId); + leaseApplyDetail.setTypeId(replaceTypeId); + } res = leaseApplyDetailsMapper.insert(leaseApplyDetail); } else if (leaseApplyDetail.getCompanyId().equals(leaseApplyInfos.getCompanyId())) { leaseApplyDetail.setParenntId(id); + if(leaseApplyDetail.getIsCt() != 0 && leaseApplyDetail.getReplaceTypeId() != null && leaseApplyDetail.getIsChange() == 1 ){ + Integer replaceTypeId = leaseApplyDetail.getReplaceTypeId(); + Integer typeId = leaseApplyDetail.getTypeId(); + leaseApplyDetail.setReplaceTypeId(typeId); + leaseApplyDetail.setTypeId(replaceTypeId); + } res = leaseApplyDetailsMapper.insert(leaseApplyDetail); } } diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml index 4145c1f..220cc64 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/BackReceiveMapper.xml @@ -572,8 +572,8 @@ ) - insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type,create_time) - values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType},now()); + insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type,create_time,replace_type_id,replace_lease_price,type_name,model_name) + values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType},now(),#{info.replaceTypeId},#{info.replaceLeasePrice},#{info.typeName},#{info.modelName}); insert into sys_file_info @@ -682,7 +682,7 @@ tta.agreement_id AS agreementId, GROUP_CONCAT( DISTINCT mt2.type_id ) AS typeId, GROUP_CONCAT(bad.id) as badId, - GROUP_CONCAT( mt2.type_name, '' ) AS typeName, + GROUP_CONCAT( DISTINCT mt2.type_name, '' ) AS typeName, bai.remark AS remark FROM back_apply_info bai @@ -1069,7 +1069,11 @@ back_id AS backId, lease_price AS leasePrice, buy_price AS buyPrice, - company_id AS companyId + company_id AS companyId, + replace_type_id AS replaceTypeId, + replace_lease_price AS replaceLeasePrice, + type_name AS typeName, + model_name AS modelName FROM slt_agreement_info WHERE diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseApplyDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseApplyDetailsMapper.xml index 7cddaea..d846f36 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseApplyDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseApplyDetailsMapper.xml @@ -93,7 +93,8 @@ lod.remark, mm.ma_code maCode, lod.parent_id as taskId, - lod.type_id as typeId + lod.type_id as typeId, + lod.model_name as replaceTypeName FROM lease_out_details lod LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id @@ -633,8 +634,28 @@ where tta.agreement_id = #{agreementId} and lad.`status` = '2' group by lad.type_id + - + insert into project_temp_cost diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml index 6c5a2ae..b66ad39 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml @@ -423,8 +423,8 @@ - insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,type_name,model_name,replace_type_id,is_slt,company_id,lease_type,create_time,ck_remark) - values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},#{record.createTime},0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},#{ma.typeName},#{ma.modelName},#{ma.replaceTypeId},'0',#{record.companyId},#{record.leaseType},now(),#{record.remark}); + insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,type_name,model_name,replace_type_id,replace_lease_price,is_slt,company_id,lease_type,create_time,ck_remark) + values (#{agreementId},#{record.typeId},#{record.maId},#{record.outNum},#{record.createTime},0,#{record.parentId},#{ma.finalPrice},#{ma.buyPrice},#{ma.typeName},#{ma.modelName},#{ma.replaceTypeId},#{ma.finalPrice},'0',#{record.companyId},#{record.leaseType},now(),#{record.remark}); insert into project_temp_cost (agreement_id,type_id,ma_id,lease_id,lease_num,start_time,end_time,day,price,lease_money,cost_type,mark_time) diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml index 2dbb052..152760b 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml @@ -486,7 +486,8 @@ tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName, bpl.lot_id as proId,bpl.lot_name as proName, bui.unit_id as unitId,bui.unit_name as unitName, - lai.lease_person as leasePerson, lai.phone as leasePhone, su.nick_name as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime, + lai.lease_person as leasePerson, lai.phone as leasePhone, su.nick_name as applyFor,d.`name` as taskName,lai.lease_type as leaseType, + DATE_FORMAT(lai.estimate_lease_time, '%Y-%m-%d') as estimateLeaseTime, case when d.id = '31' then lai.company_audit_remark when d.id = '32' then lai.dept_audit_remark when d.id = '33' then lai.direct_audit_remark @@ -496,7 +497,8 @@ end examineStatus, d.id as examineStatusId, bai.agreement_code as agreementCode, - tt.create_time as createTimes, tt.update_time as updateTimes + tt.create_time as createTimes, + tt.update_time as updateTimes FROM tm_task tt LEFT JOIN sys_user su ON tt.create_by = su.user_id @@ -538,7 +540,8 @@ tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName, bpl.lot_id as proId,bpl.lot_name as proName, bui.unit_id as unitId,bui.unit_name as unitName, - lai.lease_person as leasePerson, lai.phone as leasePhone,lai.lease_type as leaseType, lai.estimate_lease_time as estimateLeaseTime,su.nick_name as applyFor,d.`name` as taskName, + lai.lease_person as leasePerson, lai.phone as leasePhone,lai.lease_type as leaseType, + DATE_FORMAT(lai.estimate_lease_time, '%Y-%m-%d') as estimateLeaseTime,su.nick_name as applyFor,d.`name` as taskName, case when d.id = '31' then lai.company_audit_remark when d.id = '32' then lai.dept_audit_remark when d.id = '33' then lai.direct_audit_remark @@ -916,7 +919,8 @@ tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName, bpl.lot_id as proId,bpl.lot_name as proName, bui.unit_id as unitId,bui.unit_name as unitName, - lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime, + lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType, + DATE_FORMAT(lai.estimate_lease_time, '%Y-%m-%d') as estimateLeaseTime, case when d.id = '31' then lai.company_audit_remark when d.id = '32' then lai.dept_audit_remark when d.id = '33' then lai.direct_audit_remark @@ -964,7 +968,9 @@ SELECT rar.id, - rar.is_slt AS isSlt, tta.agreement_id AS agreementId, bui.unit_name AS unitName, bp.lot_name AS projectName, @@ -442,7 +441,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.unit_name as nuitName, sai.lease_price as leasePrice, sai.num as num, - lai.remark, + IF ( + sai.replace_type_id > 0, + '以大代小', + '' + ) AS remark, bb.remark as outRemark, sai.is_slt as isSlt, sai.ck_remark as ckRemark, @@ -515,7 +518,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sai.trim_day as trimDay, sai.lease_price as leasePrice, sai.num as num, - lai.remark, + IF ( + sai.replace_type_id > 0, + '以大代小', + '' + ) AS remark, bb.remark as outRemark, sai.is_slt as isSlt, sai.ck_remark as ckRemark,