功能完善
This commit is contained in:
parent
3ed2f429a8
commit
008bbc2f28
|
|
@ -1,5 +1,8 @@
|
||||||
package com.bonus.sgzb.app.controller;
|
package com.bonus.sgzb.app.controller;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
|
|
@ -10,6 +13,7 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 任务领料出库详情表控制器
|
* Description: 任务领料出库详情表控制器
|
||||||
|
|
@ -64,4 +68,20 @@ public class LeaseOutDetailsController extends BaseController {
|
||||||
return leaseOutDetailsService.submitOut(record);
|
return leaseOutDetailsService.submitOut(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
*/
|
||||||
|
@Log(title = "综合查询--领用记录查询", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/leaseOutRecord")
|
||||||
|
public AjaxResult leaseOutRecord(@RequestBody LeaseApplyDetails bean){
|
||||||
|
try {
|
||||||
|
List<LeaseApplyDetails> list = leaseOutDetailsService.leaseOutRecord(bean);
|
||||||
|
return success(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,11 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
@ApiModelProperty(value = "计量单位")
|
@ApiModelProperty(value = "计量单位")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
private String proName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所属类型
|
* 设备所属类型
|
||||||
*/
|
*/
|
||||||
|
|
@ -153,4 +158,11 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "当前库管员领料出库的单子")
|
@ApiModelProperty(value = "当前库管员领料出库的单子")
|
||||||
private Integer count;
|
private Integer count;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="开始时间")
|
||||||
|
private String startTime;
|
||||||
|
@ApiModelProperty(value="结束时间")
|
||||||
|
private String endTime;
|
||||||
|
@ApiModelProperty(value="关键字")
|
||||||
|
private String keyWord;
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.sgzb.app.mapper;
|
package com.bonus.sgzb.app.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -51,4 +53,11 @@ public interface LeaseOutDetailsMapper {
|
||||||
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
||||||
|
|
||||||
String getMachineStatus(LeaseOutDetails record);
|
String getMachineStatus(LeaseOutDetails record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
* @return List<LeaseApplyDetails>
|
||||||
|
*/
|
||||||
|
List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.sgzb.app.service;
|
package com.bonus.sgzb.app.service;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -22,4 +24,11 @@ public interface LeaseOutDetailsService {
|
||||||
List<MaMachine> getMaMachineByCode(String maCode);
|
List<MaMachine> getMaMachineByCode(String maCode);
|
||||||
|
|
||||||
List<MaMachine> getMaMachineByQrCode(String qrCode);
|
List<MaMachine> getMaMachineByQrCode(String qrCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
* @return List<TmTask>
|
||||||
|
*/
|
||||||
|
List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.app.service.impl;
|
package com.bonus.sgzb.app.service.impl;
|
||||||
|
|
||||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
||||||
import com.bonus.sgzb.app.mapper.LeaseOutDetailsMapper;
|
import com.bonus.sgzb.app.mapper.LeaseOutDetailsMapper;
|
||||||
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
||||||
|
|
@ -124,4 +125,9 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
return maMachineMapper.getMaMachineByQrCode(qrCode);
|
return maMachineMapper.getMaMachineByQrCode(qrCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean) {
|
||||||
|
return leaseOutDetailsMapper.leaseOutRecord(bean);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,40 @@
|
||||||
where ma_id = #{maId}
|
where ma_id = #{maId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="leaseOutRecord" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
||||||
|
SELECT
|
||||||
|
lod.id,
|
||||||
|
bui.unit_name as unitName,
|
||||||
|
bpl.lot_name as proName,
|
||||||
|
mt2.type_name as typeName,
|
||||||
|
mt.type_name as typeModelName,
|
||||||
|
lod.create_time as createTime,
|
||||||
|
lod.out_num as num
|
||||||
|
FROM
|
||||||
|
lease_out_details lod
|
||||||
|
LEFT JOIN lease_apply_info lai on lai.id=lod.parent_id
|
||||||
|
LEFT JOIN tm_task_agreement tta on tta.task_id=lai.task_id
|
||||||
|
LEFT JOIN bm_agreement_info bai on bai.agreement_id=tta.agreement_id
|
||||||
|
LEFT JOIN bm_project_lot bpl on bpl.lot_id=bai.project_id
|
||||||
|
LEFT JOIN bm_unit_info bui on bui.unit_id=bai.unit_id
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id=lod.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||||
|
where 1=1
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (bui.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bpl.lot_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' " >
|
||||||
|
and (lod.create_time like concat('%', #{startTime}, '%') or
|
||||||
|
lod.create_time like concat('%', #{endTime}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
ORDER BY lod.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateLeaseApplyDetailsOutNum">
|
<update id="updateLeaseApplyDetailsOutNum">
|
||||||
UPDATE
|
UPDATE
|
||||||
lease_apply_details
|
lease_apply_details
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue