Commit 9a8a6aa0 by lijingjing

修改原始记录关联问题;

修改可输入委托下样品编号重复问题;
修改委托进度查询状态不准问题;
parent 81445f50
......@@ -297,7 +297,7 @@ public class EntrustController extends ServiceController {
@ApiOperation(value = "编辑委托单", notes = "编辑报价单")
@PostMapping("/edit_entrust")
public RestResult<Boolean> editEntrust(@RequestBody EntrustDTO entrustDTO) {
return success(entrustService.editEntrust(entrustDTO, getAccount()));
return success(entrustService.editEntrust(entrustDTO, false, getAccount()));
}
@ApiOperation("保存并提交委托")
......
......@@ -36,7 +36,7 @@ public interface IEntrustService extends IBaseService<Entrust> {
boolean registerSubmitToMake(Long[] ids, Account account);
boolean editEntrust(EntrustDTO entrustDTO, Account account);
boolean editEntrust(EntrustDTO entrustDTO, boolean isSubmit, Account account);
EntrustDTO getDTOById(Long id);
......
......@@ -269,8 +269,9 @@
<select id="selectEntrustProgressList" resultType="com.patzn.cloud.service.hmhj.vo.EntrustVO">
SELECT id,code,client,client_tel,entrust_time,assignor,test_side,status,progress,sample_name,
s."sample_num"
SELECT
id,code,client,client_tel,entrust_time,assignor,test_side,status,progress,sample_name,flow_status,
s."sample_num"
FROM entrust e
left join (select s.entrust_id,count(1) "sample_num" from entrust_sample s
where s.deleted = 0 group by s.entrust_id
......
......@@ -7,23 +7,24 @@
distinct ot.id
from original_template ot
left join (
select st.company_id,st.template_id,string_agg(st.name,'~~') || '~~' "sname"
select st.company_id,st.template_id,string_agg(distinct st.name,'~~') || '~~' "sname"
from original_template_item st where st.deleted = 0 and st.type = 'sample'
group by st.company_id,st.template_id
) st ON st.template_id = ot.id
left join (
select it.company_id,it.template_id,string_agg(it.name,'~~') || '~~' "iname"
select it.company_id,it.template_id,string_agg(distinct it.name,'~~') || '~~' "iname"
from original_template_item it where it.deleted = 0 and it.type = 'item'
group by it.company_id,it.template_id
) it ON it.template_id = ot.id
where ot.deleted = 0 and (
<foreach collection="sampleItemList" index="index" item="sampleItem" separator="or" open="(" close=")">
1 != 2
(st.sname is not null or it.iname is not null)
<if test="null != sampleItem.name">
and strpos(st.sname,concat(#{sampleItem.name},'~~')) > 0
and( st.sname is null or strpos(st.sname,concat(#{sampleItem.name},'~~')) > 0)
</if>
<if test="null != sampleItem.itemList">
and (
and ( it.iname is null or
<foreach collection="sampleItem.itemList" index="ix" item="item" separator="or" open="(" close=")">
strpos(it.iname,concat(#{item},'~~')) > 0
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment