结算优化
This commit is contained in:
parent
2c16a68deb
commit
3de7f33bad
|
|
@ -115,13 +115,22 @@ public class SltAgreementInfoController extends BaseController {
|
|||
List<String> projectNames = new ArrayList<>();
|
||||
List<SltInfoVo> dataList = new ArrayList<>();
|
||||
SltInfoVo bean = new SltInfoVo();
|
||||
Long agreementId = null;
|
||||
for (SltAgreementInfo info : list) {
|
||||
unitNames.add(info.getUnitName());
|
||||
projectNames.add(info.getProjectName());
|
||||
SltInfoVo vo = sltAgreementInfoService.getSltInfo(info);
|
||||
dataList.add(vo);
|
||||
if (info.getAgreementId() != null) {
|
||||
agreementId = info.getAgreementId();
|
||||
}
|
||||
}
|
||||
bean = mergerData(bean, dataList,unitNames,projectNames);
|
||||
// 根据协议id获取申请时间
|
||||
TmTask tmTask = taskMapper.selectTaskById(agreementId);
|
||||
if (tmTask != null) {
|
||||
bean.setApplyTime(tmTask.getCreateTime());
|
||||
}
|
||||
return AjaxResult.success(bean);
|
||||
}
|
||||
public SltInfoVo mergerData(SltInfoVo vo,List<SltInfoVo> list,List<String> unitNames,List<String> projectNames){
|
||||
|
|
|
|||
|
|
@ -120,4 +120,8 @@ public class SltInfoVo {
|
|||
|
||||
String cost;
|
||||
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date applyTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,4 +92,17 @@ public interface TmTaskMapper {
|
|||
|
||||
List<TmTask> getTaskIdList(SltAgreementInfo bean);
|
||||
|
||||
/**
|
||||
* 根据协议id查询申请时间
|
||||
* @param agreementId
|
||||
* @return
|
||||
*/
|
||||
TmTask selectTaskById(Long agreementId);
|
||||
|
||||
/**
|
||||
* 根据协议id查询申请时间
|
||||
* @param agreementId
|
||||
* @return
|
||||
*/
|
||||
TmTask selectTaskByIdByCl(Long agreementId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,4 +150,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from tm_task_agreement tta
|
||||
where tta.agreement_id = #{agreementId}
|
||||
</select>
|
||||
|
||||
<select id="selectTaskById" resultType="com.bonus.material.task.domain.TmTask">
|
||||
SELECT
|
||||
creator as createBy,
|
||||
create_time as createTime
|
||||
FROM
|
||||
slt_agreement_apply
|
||||
WHERE
|
||||
1 =1
|
||||
<if test="agreementId != null">
|
||||
and agreement_id = #{agreementId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue