问题修复

This commit is contained in:
hongchao 2025-11-13 14:04:33 +08:00
parent 86755cfb96
commit 12fa25b605
20 changed files with 144 additions and 53 deletions

View File

@ -93,7 +93,7 @@ public class BackApplyInfo extends BaseEntity {
/** /**
* 联系人 * 联系人
*/ */
@Excel(name = "联系电话",sort = 6) @Excel(name = "联系电话",sort = 7)
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "联系电话")
private String phone; private String phone;
/** /**
@ -105,7 +105,7 @@ public class BackApplyInfo extends BaseEntity {
/** /**
* 单位名称 * 单位名称
*/ */
@Excel(name = "退料单位",sort = 2) @Excel(name = "退料单位",sort = 4)
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String unitName; private String unitName;
/** /**
@ -120,7 +120,7 @@ public class BackApplyInfo extends BaseEntity {
/** /**
* 类型名称 * 类型名称
*/ */
@Excel(name = "退料类型名称",sort = 4) @Excel(name = "退料类型名称",sort = 5)
@ApiModelProperty(value = "类型名称") @ApiModelProperty(value = "类型名称")
private String typeName; private String typeName;
/** /**
@ -142,12 +142,12 @@ public class BackApplyInfo extends BaseEntity {
@ApiModelProperty(value = "退料单号") @ApiModelProperty(value = "退料单号")
private String code; private String code;
@Excel(name = "退料人员",sort = 5) @Excel(name = "退料人员",sort = 6)
@ApiModelProperty(value = "退料人员") @ApiModelProperty(value = "退料人员")
private String backPerson; private String backPerson;
@Excel(name = "申请时间",sort = 7) @Excel(name = "计划退料时间",sort = 2)
@ApiModelProperty(value = "退料日期") @ApiModelProperty(value = "退料日期")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")

View File

@ -242,4 +242,9 @@ public class SltAgreementInfo {
* 是否根据同类型最大结算时间得来01 * 是否根据同类型最大结算时间得来01
*/ */
private Integer isMaxEndTime; private Integer isMaxEndTime;
private BigDecimal replaceLeasePrice;
private Integer replaceTypeId;
} }

View File

@ -96,7 +96,7 @@ public class BackReceiveController extends BaseController {
public void export(HttpServletResponse response, BackApplyInfo record) { public void export(HttpServletResponse response, BackApplyInfo record) {
List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record); List<BackApplyInfo> list = backReceiveService.getbackReceiveList(record);
ExcelUtil<BackApplyInfo> util = new ExcelUtil<BackApplyInfo>(BackApplyInfo.class); ExcelUtil<BackApplyInfo> util = new ExcelUtil<BackApplyInfo>(BackApplyInfo.class);
util.exportExcel(response, list, "料接收数据"); util.exportExcel(response, list, "退料接收数据");
} }

View File

@ -145,6 +145,19 @@ public class LeaseOutDetailsController extends BaseController {
return AjaxResult.success(getDataTable(detailsByApplyId)); 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<TmTask> detailsByApplyId = leaseOutDetailsService.getDetailsByTypeIdNum(typeId);
return AjaxResult.success(detailsByApplyId);
}
/** /**
* 领料出库对库存处理 * 领料出库对库存处理
* *

View File

@ -221,4 +221,9 @@ public class LeaseApplyDetails implements Serializable {
private String isStorage; private String isStorage;
private List<LeaseApplyDetails> ctList; private List<LeaseApplyDetails> ctList;
private String replaceTypeName;
//是否以大代小0否 1是
private Integer isChange;
} }

View File

@ -178,7 +178,7 @@ public class LeaseApplyInfo implements Serializable {
@ApiModelProperty(value="预领取时间") @ApiModelProperty(value="预领取时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss") // @JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date estimateLeaseTime; private String estimateLeaseTime;
} }

View File

@ -53,4 +53,5 @@ public class LeaseOutDetailRecord {
//成套设备信息 //成套设备信息
private List<MaWholeVo> maWholeVos; private List<MaWholeVo> maWholeVos;
private String replaceTypeName;
} }

View File

@ -144,7 +144,7 @@ public class TmTask implements Serializable {
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
@Excel(name = "备注", sort = 11) @Excel(name = "备注", sort = 12)
private String remark; private String remark;
/** /**
@ -202,7 +202,7 @@ public class TmTask implements Serializable {
@ApiModelProperty(value = "往来单位id") @ApiModelProperty(value = "往来单位id")
private Long unitId; private Long unitId;
@ApiModelProperty(value = "往来单位") @ApiModelProperty(value = "往来单位")
@Excel(name = "领料单位", sort = 2) @Excel(name = "领料单位", sort = 4)
private String unitName; private String unitName;
@ApiModelProperty(value = "工程id") @ApiModelProperty(value = "工程id")
@ -218,34 +218,33 @@ public class TmTask implements Serializable {
@ApiModelProperty(value = "协议编号") @ApiModelProperty(value = "协议编号")
@Excel(name = "协议号", sort = 4) @Excel(name = "协议号", sort = 6)
private String agreementCode; private String agreementCode;
@ApiModelProperty(value = "领料人") @ApiModelProperty(value = "领料人")
@Excel(name = "领料人", sort = 5) @Excel(name = "领料人", sort = 7)
private String leasePerson; private String leasePerson;
@ApiModelProperty(value = "领料人手机号") @ApiModelProperty(value = "领料人手机号")
@Excel(name = "联系电话", sort = 6) @Excel(name = "联系电话", sort = 8)
private String leasePhone; private String leasePhone;
@ApiModelProperty(value = "申请人") @ApiModelProperty(value = "申请人")
@Excel(name = "申请人", sort = 7) @Excel(name = "申请人", sort = 9)
private String applyFor; private String applyFor;
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@Excel(name = "任务状态", sort = 9) @Excel(name = "任务状态", sort = 10)
private String taskName; private String taskName;
@ApiModelProperty(value = "审批状态id") @ApiModelProperty(value = "审批状态id")
private String examineStatusId; private String examineStatusId;
@ApiModelProperty(value = "审批状态的备注") @ApiModelProperty(value = "审批状态的备注")
@Excel(name = "审批结果", sort = 10) @Excel(name = "审批意见", sort = 11)
private String examineStatus; private String examineStatus;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@Excel(name = "申请时间", sort = 8)
private String createTimes; private String createTimes;
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@ -270,7 +269,7 @@ public class TmTask implements Serializable {
private String deptAuditRemark; private String deptAuditRemark;
@ApiModelProperty(value = "领用类型0 工程租赁 1长期领用") @ApiModelProperty(value = "领用类型0 工程租赁 1长期领用")
@Excel(name = "领料类型", readConverterExp = "0=工程租赁,1=长期租赁") @Excel(name = "领料类型",sort=5, readConverterExp = "0=工程租赁,1=长期租赁")
private String leaseType; private String leaseType;
private String userId; private String userId;
@ -286,9 +285,10 @@ public class TmTask implements Serializable {
private String typeId; private String typeId;
private Integer partNum; private Integer partNum;
@ApiModelProperty(value = "预计领料时间(重庆)") @ApiModelProperty(value = "预计领料时间(重庆)")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date estimateLeaseTime; @Excel(name = "计划领料时间", sort = 2)
private String estimateLeaseTime;
private Integer souceByRefuse; private Integer souceByRefuse;
private int souceBy; private int souceBy;
@ -329,7 +329,7 @@ public class TmTask implements Serializable {
* 机具规格id * 机具规格id
* */ * */
@ApiModelProperty(value = "以大代小id") @ApiModelProperty(value = "以大代小id")
private long replaceTypeId; private Integer replaceTypeId;
@ApiModelProperty(value = "库管员id字符串") @ApiModelProperty(value = "库管员id字符串")
private String maTypeUserId; private String maTypeUserId;
@ -365,6 +365,10 @@ public class TmTask implements Serializable {
@ApiModelProperty(value = "领料id") @ApiModelProperty(value = "领料id")
private Integer leaseId; private Integer leaseId;
private String replaceTypeName;
private Integer replaceNum;
public void setLeaseFee(BigDecimal leaseFee) { public void setLeaseFee(BigDecimal leaseFee) {
this.leaseFee = leaseFee; this.leaseFee = leaseFee;
} }

View File

@ -73,7 +73,7 @@ public class TmTaskVo implements Serializable {
* 领用类型 * 领用类型
*/ */
@ApiModelProperty(value = "领料类型") @ApiModelProperty(value = "领料类型")
@Excel(name = "领料类型", sort = 12, readConverterExp = "0=工程租赁,1=长期租赁") @Excel(name = "领料类型", sort = 5, readConverterExp = "0=工程租赁,1=长期租赁")
private String leaseType; private String leaseType;
/** /**
@ -109,7 +109,7 @@ public class TmTaskVo implements Serializable {
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
@Excel(name = "备注", sort = 11) @Excel(name = "备注", sort = 10)
private String remark; private String remark;
/** /**
@ -155,7 +155,7 @@ public class TmTaskVo implements Serializable {
@ApiModelProperty(value = "往来单位id") @ApiModelProperty(value = "往来单位id")
private Long unitId; private Long unitId;
@ApiModelProperty(value = "往来单位") @ApiModelProperty(value = "往来单位")
@Excel(name = "领料单位", sort = 2) @Excel(name = "领料单位", sort = 4)
private String unitName; private String unitName;
@ApiModelProperty(value = "工程id") @ApiModelProperty(value = "工程id")
@ -171,23 +171,22 @@ public class TmTaskVo implements Serializable {
@ApiModelProperty(value = "协议编号") @ApiModelProperty(value = "协议编号")
@Excel(name = "协议号", sort = 4) @Excel(name = "协议号", sort = 6)
private String agreementCode; private String agreementCode;
@ApiModelProperty(value = "领料人") @ApiModelProperty(value = "领料人")
@Excel(name = "领料人", sort = 5) @Excel(name = "领料人", sort = 7)
private String leasePerson; private String leasePerson;
@ApiModelProperty(value = "领料人手机号") @ApiModelProperty(value = "领料人手机号")
@Excel(name = "联系电话", sort = 6) @Excel(name = "联系电话", sort = 8)
private String leasePhone; private String leasePhone;
@ApiModelProperty(value = "申请人") @ApiModelProperty(value = "申请人")
@Excel(name = "申请人", sort = 7) @Excel(name = "申请人", sort = 9)
private String applyFor; private String applyFor;
@ApiModelProperty(value = "任务状态") @ApiModelProperty(value = "任务状态")
@Excel(name = "任务状态", sort = 9)
private String taskName; private String taskName;
@ApiModelProperty(value = "审批状态id") @ApiModelProperty(value = "审批状态id")
@ -197,9 +196,12 @@ public class TmTaskVo implements Serializable {
private String examineStatus; private String examineStatus;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@Excel(name = "申请时间", sort = 8)
private String createTimes; private String createTimes;
@ApiModelProperty(value = "计划预领时间")
@Excel(name = "计划预领时间", sort = 2)
private String estimateLeaseTime;
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
private String updateTimes; private String updateTimes;

View File

@ -54,6 +54,8 @@ public interface LeaseApplyDetailsMapper {
List<TmTask> getDetailsByApplyId(TmTask typeId); List<TmTask> getDetailsByApplyId(TmTask typeId);
List<TmTask> getDetailsByTypeIdNum(TmTask typeId);
TmTask getOrderHead(String parentId); TmTask getOrderHead(String parentId);
List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId); List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId);

View File

@ -127,4 +127,5 @@ public interface LeaseOutDetailsMapper {
List<TmTask> getSltFeeList(TmTask bean); List<TmTask> getSltFeeList(TmTask bean);
int checkUpdateRecords(TmTask bean); int checkUpdateRecords(TmTask bean);
} }

View File

@ -79,6 +79,8 @@ public interface LeaseOutDetailsService {
List<TmTask> getDetailsByApplyId(TmTask id); List<TmTask> getDetailsByApplyId(TmTask id);
List<TmTask> getDetailsByTypeIdNum(TmTask id);
TmTask getLeaseOutOrder(String parentId,String typeId); TmTask getLeaseOutOrder(String parentId,String typeId);
int delMachineByRfid(MaMachine maMachine); int delMachineByRfid(MaMachine maMachine);

View File

@ -202,6 +202,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
return leaseApplyDetailsMapper.getDetailsByApplyId(typeId); return leaseApplyDetailsMapper.getDetailsByApplyId(typeId);
} }
@Override
public List<TmTask> getDetailsByTypeIdNum(TmTask typeId) {
return leaseApplyDetailsMapper.getDetailsByTypeIdNum(typeId);
}
@Override @Override
public TmTask getLeaseOutOrder(String parentId, String typeId) { public TmTask getLeaseOutOrder(String parentId, String typeId) {
TmTask orderHead = leaseApplyDetailsMapper.getOrderHead(parentId); TmTask orderHead = leaseApplyDetailsMapper.getOrderHead(parentId);
@ -579,8 +584,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
} }
} else { } else {
// 普通机具减少 (ma_type 设备规格表)的库存数量 // 普通机具减少 (ma_type 设备规格表)的库存数量
res = leaseOutDetailsMapper.updateMaTypeStockNum(record); res = leaseOutDetailsMapper.updateMaTypeStockNum(record);
} }
// 更新 (ma_machine 设备表)的状态 // 更新 (ma_machine 设备表)的状态
leaseOutDetailsMapper.updateMaMachineStatus(record); leaseOutDetailsMapper.updateMaMachineStatus(record);

View File

@ -1364,7 +1364,7 @@ public class TmTaskServiceImpl implements TmTaskService {
Long taskId = task.getTaskId(); Long taskId = task.getTaskId();
if (CollUtil.isNotEmpty(leaseApplyDetails)) { if (CollUtil.isNotEmpty(leaseApplyDetails)) {
for (LeaseApplyDetails leaseApplyDetail : 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("请输入预领数量"); throw new RuntimeException("请输入预领数量");
} }
LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo(); LeaseApplyInfo leaseApplyInfos = new LeaseApplyInfo();
@ -1376,9 +1376,21 @@ public class TmTaskServiceImpl implements TmTaskService {
Integer id = leaseApplyInfos.getId(); Integer id = leaseApplyInfos.getId();
if (leaseApplyDetail.getCompanyId() == null && leaseApplyInfos.getCompanyId() == null) { if (leaseApplyDetail.getCompanyId() == null && leaseApplyInfos.getCompanyId() == null) {
leaseApplyDetail.setParenntId(id); 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); res = leaseApplyDetailsMapper.insert(leaseApplyDetail);
} else if (leaseApplyDetail.getCompanyId().equals(leaseApplyInfos.getCompanyId())) { } else if (leaseApplyDetail.getCompanyId().equals(leaseApplyInfos.getCompanyId())) {
leaseApplyDetail.setParenntId(id); 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); res = leaseApplyDetailsMapper.insert(leaseApplyDetail);
} }
} }

View File

@ -572,8 +572,8 @@
) )
</insert> </insert>
<insert id="insStlInfoTwo"> <insert id="insStlInfoTwo">
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) 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()); 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> </insert>
<insert id="insertBmFileInfo"> <insert id="insertBmFileInfo">
insert into sys_file_info insert into sys_file_info
@ -682,7 +682,7 @@
tta.agreement_id AS agreementId, tta.agreement_id AS agreementId,
GROUP_CONCAT( DISTINCT mt2.type_id ) AS typeId, GROUP_CONCAT( DISTINCT mt2.type_id ) AS typeId,
GROUP_CONCAT(bad.id) as badId, 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 bai.remark AS remark
FROM FROM
back_apply_info bai back_apply_info bai
@ -1069,7 +1069,11 @@
back_id AS backId, back_id AS backId,
lease_price AS leasePrice, lease_price AS leasePrice,
buy_price AS buyPrice, 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 FROM
slt_agreement_info slt_agreement_info
WHERE WHERE

View File

@ -93,7 +93,8 @@
lod.remark, lod.remark,
mm.ma_code maCode, mm.ma_code maCode,
lod.parent_id as taskId, lod.parent_id as taskId,
lod.type_id as typeId lod.type_id as typeId,
lod.model_name as replaceTypeName
FROM FROM
lease_out_details lod lease_out_details lod
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id 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' where tta.agreement_id = #{agreementId} and lad.`status` = '2'
group by lad.type_id group by lad.type_id
</select> </select>
<select id="getDetailsByTypeIdNum" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
mt.type_id AS typeId,
mm.ma_code AS maCode,
mm.ma_id AS maId,
sd.NAME AS maStatus
FROM
ma_type mt
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN ma_machine mm ON mt.type_id = mm.type_id
LEFT JOIN sys_dic sd ON sd.id = mm.ma_status
WHERE
mm.ma_status in ('15','16')
AND mt.type_id = #{typeId}
<if test="maCode != null and maCode !=''">
AND mm.ma_code like concat('%', #{maCode}, '%')
</if>
</select>
<insert id="insertSltFee"> <insert id="insertSltFee">
insert into project_temp_cost insert into project_temp_cost
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="leaseId != null"> <if test="leaseId != null">

View File

@ -423,8 +423,8 @@
</trim> </trim>
</insert> </insert>
<insert id="insSltInfo"> <insert id="insSltInfo">
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) 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},'0',#{record.companyId},#{record.leaseType},now(),#{record.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> </insert>
<insert id="insertMonthTempInfo"> <insert id="insertMonthTempInfo">
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) 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)

View File

@ -486,7 +486,8 @@
tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName, tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
bpl.lot_id as proId,bpl.lot_name as proName, bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName, 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 case when d.id = '31' then lai.company_audit_remark
when d.id = '32' then lai.dept_audit_remark when d.id = '32' then lai.dept_audit_remark
when d.id = '33' then lai.direct_audit_remark when d.id = '33' then lai.direct_audit_remark
@ -496,7 +497,8 @@
end examineStatus, end examineStatus,
d.id as examineStatusId, d.id as examineStatusId,
bai.agreement_code as agreementCode, 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 FROM
tm_task tt tm_task tt
LEFT JOIN sys_user su ON tt.create_by = su.user_id 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, tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
bpl.lot_id as proId,bpl.lot_name as proName, bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName, 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 case when d.id = '31' then lai.company_audit_remark
when d.id = '32' then lai.dept_audit_remark when d.id = '32' then lai.dept_audit_remark
when d.id = '33' then lai.direct_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, tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,
bpl.lot_id as proId,bpl.lot_name as proName, bpl.lot_id as proId,bpl.lot_name as proName,
bui.unit_id as unitId,bui.unit_name as unitName, 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 case when d.id = '31' then lai.company_audit_remark
when d.id = '32' then lai.dept_audit_remark when d.id = '32' then lai.dept_audit_remark
when d.id = '33' then lai.direct_audit_remark when d.id = '33' then lai.direct_audit_remark
@ -964,7 +968,9 @@
</select> </select>
<select id="getLeaseApplyDetailsByApply" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails"> <select id="getLeaseApplyDetailsByApply" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
SELECT SELECT
lad.*,mt2.type_id as levelTwoId, mt.type_name AS typeModelName, lad.replace_type_id as replaceTypeId,mt.is_storage, mt.is_replace as isReplace, mt1.type_id as maTypeId, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType, lad.id,lad.parennt_id as parentId,lad.type_id as typeId,lad.pre_num as preNum,lad.model_name as maModel,lad.lease_price as leasePrice,
lad.company_id as companyId,lad.replace_type_id as replaceTypeId,lad.is_ct as isCt,lad.ct_parent_id as ctParentId,lad.remark,
mt2.type_id as levelTwoId, mt.type_name AS typeModelName,mt.is_storage, mt.is_replace as isReplace, mt1.type_id as maTypeId, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName, case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
CASE mt.manage_type CASE mt.manage_type
WHEN 0 THEN WHEN 0 THEN
@ -972,7 +978,8 @@
ELSE ELSE
IFNULL(mt.num, 0) IFNULL(mt.num, 0)
END as num, END as num,
(lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum, subquery0.ma_code as maCode (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum, subquery0.ma_code as maCode,
0 as isChange
FROM FROM
lease_apply_details lad lease_apply_details lad
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
@ -995,7 +1002,7 @@
</select> </select>
<select id="getLeaseApplyDetailsCq" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails"> <select id="getLeaseApplyDetailsCq" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
SELECT SELECT
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType, lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName,lad.model_name as replaceTypeName, mt.manage_type as manageType,
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName, case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
CASE mt.manage_type CASE mt.manage_type
WHEN 0 THEN WHEN 0 THEN

View File

@ -48,6 +48,7 @@
LEFT JOIN ma_machine ma ON ma.ma_id = a.ma_id LEFT JOIN ma_machine ma ON ma.ma_id = a.ma_id
LEFT JOIN sys_user user on user.user_id =a.binder LEFT JOIN sys_user user on user.user_id =a.binder
where 1=1 where 1=1
and b.ma_id is not null
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and (b.label_code like concat('%',#{keyWord},'%') or and (b.label_code like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%') or mt2.type_name like concat('%',#{keyWord},'%') or

View File

@ -244,7 +244,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getRepairDetailsList" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo"> <select id="getRepairDetailsList" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
SELECT SELECT
rar.id, rar.id,
rar.is_slt AS isSlt,
tta.agreement_id AS agreementId, tta.agreement_id AS agreementId,
bui.unit_name AS unitName, bui.unit_name AS unitName,
bp.lot_name AS projectName, bp.lot_name AS projectName,
@ -442,7 +441,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.unit_name as nuitName, mt.unit_name as nuitName,
sai.lease_price as leasePrice, sai.lease_price as leasePrice,
sai.num as num, sai.num as num,
lai.remark, IF (
sai.replace_type_id > 0,
'以大代小',
''
) AS remark,
bb.remark as outRemark, bb.remark as outRemark,
sai.is_slt as isSlt, sai.is_slt as isSlt,
sai.ck_remark as ckRemark, sai.ck_remark as ckRemark,
@ -515,7 +518,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.trim_day as trimDay, sai.trim_day as trimDay,
sai.lease_price as leasePrice, sai.lease_price as leasePrice,
sai.num as num, sai.num as num,
lai.remark, IF (
sai.replace_type_id > 0,
'以大代小',
''
) AS remark,
bb.remark as outRemark, bb.remark as outRemark,
sai.is_slt as isSlt, sai.is_slt as isSlt,
sai.ck_remark as ckRemark, sai.ck_remark as ckRemark,