Commit 340985ae by jiangyun

修改

parent 4c95dc1d
......@@ -2,6 +2,8 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -101,4 +103,17 @@ public class SjLjfzqkController extends BaseController
{
return toAjax(sjLjfzqkService.deleteSjLjfzqkByIds(ids));
}
@PostMapping("/pladd2Ljfzqk")
public AjaxResult pladd2Ljfzqk(@RequestBody List<SjLjjw> list) throws Exception
{
return toAjax(sjLjfzqkService.insertSjLjfzqkBatch(list));
}
}
......@@ -2,6 +2,8 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -41,7 +43,7 @@ public class SjLjzjyfzqkController extends BaseController
@GetMapping("/list")
public TableDataInfo list(SjLjzjyfzqk sjLjzjyfzqk)
{
startPage();
// startPage();
List<SjLjzjyfzqk> list = sjLjzjyfzqkService.selectSjLjzjyfzqkList(sjLjzjyfzqk);
return getDataTable(list);
}
......@@ -101,4 +103,11 @@ public class SjLjzjyfzqkController extends BaseController
{
return toAjax(sjLjzjyfzqkService.deleteSjLjzjyfzqkByIds(ids));
}
@PostMapping("/pladd2")
public AjaxResult pladd2(@RequestBody List<SjLjjw> list) throws Exception
{
return toAjax(sjLjzjyfzqkService.insertSjLjzjyfzqkBatch(list));
}
}
......@@ -230,7 +230,9 @@ public class SjDjjc extends ProcessBaseEntity
private String ndxsjg;
private String sgdw;
//类型(工程、钻井液)
private String lx;
/** 钻井液流程实例id */
......
......@@ -66,144 +66,7 @@ public class SjJsjg extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
//水泥固封段
private String sngfd;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setJh(String jh)
{
this.jh = jh;
}
public String getJh()
{
return jh;
}
public void setKc(String kc)
{
this.kc = kc;
}
public String getKc()
{
return kc;
}
public void setZtzj(Double ztzj)
{
this.ztzj = ztzj;
}
public Double getZtzj()
{
return ztzj;
}
public void setJs(Double js)
{
this.js = js;
}
public Double getJs()
{
return js;
}
public void setTtwj(Double ttwj)
{
this.ttwj = ttwj;
}
public Double getTtwj()
{
return ttwj;
}
public void setTtds(Double ttds)
{
this.ttds = ttds;
}
public Double getTtds()
{
return ttds;
}
public void setTtxs(Double ttxs)
{
this.ttxs = ttxs;
}
public Double getTtxs()
{
return ttxs;
}
public void setSnfg(Double snfg)
{
this.snfg = snfg;
}
public Double getSnfg()
{
return snfg;
}
public void setBz(String bz)
{
this.bz = bz;
}
public String getBz()
{
return bz;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("jh", getJh())
.append("kc", getKc())
.append("ztzj", getZtzj())
.append("js", getJs())
.append("ttwj", getTtwj())
.append("ttds", getTtds())
.append("ttxs", getTtxs())
.append("snfg", getSnfg())
.append("bz", getBz())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
......@@ -50,11 +50,11 @@ public class SjLjjw extends BaseEntity
/** 钻井周期 */
@Excel(name = "钻井周期")
private Double zjzq;
private String zjzq;
/** 钻完周期 */
@Excel(name = "钻完周期")
private Double wjzq;
private String wjzq;
/** 井口距离 */
@Excel(name = "井口距离")
......@@ -112,7 +112,7 @@ public class SjLjjw extends BaseEntity
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
private String jjzq1;
}
......@@ -72,4 +72,6 @@ public interface SjDjjcMapper
SjDjjc selectSjDjjcByinstanceIdZjy(String instanceId);
List<SjDjjc> getGcList(SjDjjc sjDjjc);
}
......@@ -63,4 +63,5 @@ public interface SjLjfzqkMapper
int insertSjLjfzqkBatch(List<SjLjfzqk> jsqaList);
}
package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjzjyfzqk;
/**
......@@ -58,4 +60,9 @@ public interface SjLjzjyfzqkMapper
* @return 结果
*/
public int deleteSjLjzjyfzqkByIds(Long[] ids);
int deleteSjLjzjyfzqkByZbid(Long zbid);
int insertSjLjzjyfzqkBatch(List<SjLjfzqk> jsqaList);
}
......@@ -74,4 +74,6 @@ public interface ISjDjjcService
int getGzbjList(String jh) throws Exception;
List<SjDjjc> getGcList(SjDjjc sjDjjc);
}
......@@ -2,6 +2,7 @@ package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
/**
* 邻井复杂情况Service接口
......@@ -58,4 +59,7 @@ public interface ISjLjfzqkService
* @return 结果
*/
public int deleteSjLjfzqkById(Long id);
int insertSjLjfzqkBatch(List<SjLjjw> list);
}
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.domain.SjLjzjyfzqk;
/**
......@@ -58,4 +60,7 @@ public interface ISjLjzjyfzqkService
* @return 结果
*/
public int deleteSjLjzjyfzqkById(Long id);
int insertSjLjzjyfzqkBatch(List<SjLjjw> list);
}
......@@ -59,6 +59,9 @@ public class ProcessServiceImpl implements ProcessService {
// 考虑到候选用户组,会有多个 todoitem 办理同个 task
List<BizTodoItem> updateList = CollectionUtils.isEmpty(bizTodoItemService.selectBizTodoItemList(query)) ? null : bizTodoItemService.selectBizTodoItemList(query);
for (BizTodoItem update: updateList) {
if(update.getIsHandle().equals("1")){
continue;
}
// 找到当前登录用户的 todoitem,置为已办
if (update.getTodoUserId().equals(SecurityUtils.getUsername())) {
update.setIsView("1");
......
......@@ -1478,9 +1478,11 @@ public class SjDjjcServiceImpl implements ISjDjjcService
return 1;
}
@Override
@DataScope(deptAlias = "d")
public List<SjDjjc> getGcList(SjDjjc sjDjjc) {
return sjDjjcMapper.getGcList(sjDjjc);
}
}
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import java.util.stream.Collectors;
import com.zjsgfa.project.zjsgfa.domain.SjDjjc;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.mapper.SjDjjcMapper;
import com.zjsgfa.project.zt.domain.CommonParam;
import com.zjsgfa.project.zt.service.DjdcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.SjLjfzqkMapper;
......@@ -19,6 +26,13 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService
@Autowired
private SjLjfzqkMapper sjLjfzqkMapper;
@Autowired
private SjDjjcMapper sjDjjcMapper;
@Autowired
private DjdcService djdcService;
/**
* 查询邻井复杂情况
*
......@@ -90,4 +104,24 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService
{
return sjLjfzqkMapper.deleteSjLjfzqkById(id);
}
@Override
public int insertSjLjfzqkBatch(List<SjLjjw> list) {
String jh = list.get(0).getJh();
SjDjjc sjDjjc = sjDjjcMapper.selectSjDjjcByJh(jh);
//先删除已有数据
sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
CommonParam param1 = new CommonParam();
param1.setJh(String.join(",",list.stream().map(SjLjjw::getLjjh).collect(Collectors.toList())));
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
}
return 1;
}
}
......@@ -205,15 +205,15 @@ public class SjLjjwServiceImpl implements ISjLjjwService
sjZtgjsjMapper.deleteSjZtgjsjByJh(jh);
sjZtgjsjMapper.insertSjZtgjsjBatch(sjZtgjsjList);
}
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
}
// //复杂情况
// param1.setJkhzb(sjDjjc.getJkhzb());
// param1.setJkzzb(sjDjjc.getJkzzb());
// List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
// if(jsqaList.size()>0){
// jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
// sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
// sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
// }
......
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import com.zjsgfa.project.zjsgfa.domain.SjDjjc;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.mapper.SjDjjcMapper;
import com.zjsgfa.project.zt.domain.CommonParam;
import com.zjsgfa.project.zt.service.DjdcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.SjLjzjyfzqkMapper;
......@@ -19,6 +28,15 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
@Autowired
private SjLjzjyfzqkMapper sjLjzjyfzqkMapper;
@Autowired
private SjDjjcMapper sjDjjcMapper;
@Autowired
private DjdcService djdcService;
/**
* 查询邻井复杂情况-钻井液
*
......@@ -90,4 +108,25 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
{
return sjLjzjyfzqkMapper.deleteSjLjzjyfzqkById(id);
}
@Override
public int insertSjLjzjyfzqkBatch(List<SjLjjw> list) {
String jh = list.get(0).getJh();
SjDjjc sjDjjc = sjDjjcMapper.selectSjDjjcByJh(jh);
//先删除已有数据
sjLjzjyfzqkMapper.deleteSjLjzjyfzqkByZbid(sjDjjc.getId());
CommonParam param1 = new CommonParam();
param1.setJh(String.join(",",list.stream().map(SjLjjw::getLjjh).collect(Collectors.toList())));
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjzjyfzqkMapper.insertSjLjzjyfzqkBatch(jsqaList);
}
return 1;
}
}
......@@ -90,4 +90,6 @@ public class CommonParam {
private String searchType;
private String fzqk;
}
......@@ -31,11 +31,11 @@ public class Ljjw {
//钻井周期
@Excel(name = "钻井周期")
private Double zjzq;
private String zjzq;
//完井周期
@Excel(name = "钻完周期")
private Double wjzq;
private String wjzq;
//井口距离
......@@ -88,7 +88,9 @@ public class Ljjw {
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
private String jjzq1;
private String fzqk;
......
......@@ -188,6 +188,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSjDjjcVo"/>
where a.zjyinstance_id = #{instanceId}
</select>
<select id="getGcList" resultType="com.zjsgfa.project.zjsgfa.domain.SjDjjc">
select a.*, b.ndxsjg, c.sgdw, d.dept_name
from sj_djjc a
left join sj_ndxm b on a.id = b.zbid
left join sj_gcjbsj c on a.id = c.zbid
left join sys_dept d on a.deptid = d.dept_id
where 1=1
<if test="lx!=null and lx != '' and lx=='1'.toString()">
and process_status='通过'
</if>
<if test="lx!=null and lx != '' and lx=='2'.toString()">
and zjyprocess_status='通过'
</if>
<if test="jh != null and jh != ''">and a.jh like concat('%', #{jh}, '%')</if>
<if test="sgdw != null and sgdw != ''">and c.sgdw = #{sgdw}</if>
<if test="jfdw != null and jfdw != ''">and a.jfdw = #{jfdw}</if>
<if test="qk != null and qk != ''">and a.qk = #{qk}</if>
<if test="ndxsjg != null and ndxsjg != ''">and b.ndxsjg = #{ndxsjg}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.created_time desc
</select>
<insert id="insertSjDjjc" parameterType="SjDjjc" useGeneratedKeys="true" keyProperty="id">
insert into sj_djjc
......
......@@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createdTime" column="created_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="sngfd" column="sngfd" />
</resultMap>
<sql id="selectSjJsjgVo">
select id, jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz, created_by, created_time, update_by, update_time from sj_jsjg
select id, jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz, created_by, created_time, update_by, update_time,sngfd from sj_jsjg
</sql>
<select id="selectSjJsjgList" parameterType="SjJsjg" resultMap="SjJsjgResult">
......@@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="sngfd != null "> and sngfd = #{sngfd}</if>
</where>
order by jh ,js
</select>
......@@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">created_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="sngfd != null">sngfd,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -83,12 +86,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">#{createdTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="sngfd != null">#{sngfd},</if>
</trim>
</insert>
<insert id="insertSjJsjgBatch">
insert into sj_jsjg( jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz) values
insert into sj_jsjg( jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz,sngfd) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.jh}, #{item.kc}, #{item.ztzj}, #{item.js}, #{item.ttwj}, #{item.ttds}, #{item.ttxs}, #{item.snfg}, #{item.bz})
( #{item.jh}, #{item.kc}, #{item.ztzj}, #{item.js}, #{item.ttwj}, #{item.ttds}, #{item.ttxs}, #{item.snfg}, #{item.bz}, #{item.sngfd})
</foreach>
</insert>
<insert id="insertSjJsjgt">
......@@ -119,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="sngfd != null">sngfd = #{sngfd},</if>
</trim>
where id = #{id}
</update>
......
......@@ -110,4 +110,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteSjLjfzqkByJh">
delete from sj_ljfzqk where zbid = #{zbid}
</delete>
</mapper>
\ No newline at end of file
......@@ -58,6 +58,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fzqk != null">#{fzqk},</if>
</trim>
</insert>
<insert id="insertSjLjzjyfzqkBatch">
<foreach collection="list" item="item" separator=";">
insert into sj_ljzjyfzqk
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="item.jh != null">jh,</if>
<if test="item.ljjh != null">ljjh,</if>
<if test="item.jl != null">jl,</if>
<if test="item.sj != null">sj,</if>
<if test="item.wzjs != null">wzjs,</if>
<if test="item.fzqk != null">fzqk,</if>
<if test="item.zbid != null">zbid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="item.jh != null">#{item.jh},</if>
<if test="item.ljjh != null">#{item.ljjh},</if>
<if test="item.jl != null">#{item.jl},</if>
<if test="item.sj != null">#{item.sj},</if>
<if test="item.wzjs != null">#{item.wzjs},</if>
<if test="item.fzqk != null">#{item.fzqk},</if>
<if test="item.zbid != null">#{item.zbid},</if>
</trim>
</foreach>
</insert>
<update id="updateSjLjzjyfzqk" parameterType="SjLjzjyfzqk">
update sj_ljzjyfzqk
......@@ -83,4 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteSjLjzjyfzqkByZbid">
delete from sj_ljzjyfzqk where zbid = #{zbid}
</delete>
</mapper>
\ No newline at end of file
......@@ -593,8 +593,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
<if test="jkhzb!=null and jkzzb!=null">
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
......@@ -614,7 +612,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
b.jjzq1 ||'d' || case when b.JJZQ2 is null then 0 else b.JJZQ2 end ||'h' wjzq,
b.jjzq1 ||'d' || case when b.JJZQ2 is null then 0 else b.JJZQ2 end ||'h' jjzq1,
b.zjzq1 ||'d' || case when b.zjzq2 is null then 0 else b.zjzq2 end ||'h' zjzq,
case when qa.jh is not null then '是' else '否' end fzqk,
fm.zjbh dh
FROM JSBA a
left join jsaa b
......@@ -622,16 +623,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join jsfm fm
on a.jh = fm.jh
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh from JSQA group by jh) qa
on a.jh = qa.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%' and tgcc not like '%其它%'
......@@ -678,6 +671,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
<if test="fzqk != null and fzqk !='' and fzqk=='是'.toString()">
and qa.jh is not null
</if>
<if test="fzqk != null and fzqk !='' and fzqk=='否'.toString()">
and qa.jh is null
</if>
order by WJRQ desc NULLS LAST) where
1=1
......
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