Commit b6d44c41 by jiang'yun

修改

parent 6e040cc3
......@@ -144,45 +144,32 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 添加CORS filter
.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class)
.addFilterBefore(corsFilter, LogoutFilter.class);
}
//开启cas
if (casProperties.isCasEnable()) {
httpSecurity
// CSRF禁用,因为不使用session
.csrf().disable()
.csrf(csrf -> csrf.disable())
// 禁用HTTP响应标头
.headers((headersCustomizer) -> {
headersCustomizer.cacheControl(cache -> cache.disable()).frameOptions(options -> options.sameOrigin());
})
// 认证失败处理类
.exceptionHandling(exception -> exception.authenticationEntryPoint(unauthorizedHandler))
// 基于token,所以不需要session
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// 过滤请求
.authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问
//.antMatchers("/login", "/captchaImage").anonymous()
.antMatchers(
HttpMethod.GET,
"/*.html",
"/**/*.html",
"/**/*.css",
"/**/*.js"
).permitAll()
.antMatchers("/profile/**").anonymous()
.antMatchers("/common/download**").anonymous()
.antMatchers("/common/download/resource**").anonymous()
.antMatchers("/swagger-ui.html").anonymous()
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous()
.antMatchers("/websocket/**").anonymous()
.antMatchers("/magic/web/**").anonymous()
.antMatchers("/**/**").anonymous()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()
.and()
.headers().frameOptions().disable();
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
// 注解标记允许匿名访问的url
.authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/**/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
});
//单点登录登出
httpSecurity.logout().permitAll().logoutSuccessHandler(logoutSuccessHandler);
// Custom JWT based security filter
......@@ -199,6 +186,56 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// disable page caching
httpSecurity.headers().cacheControl();
}
//开启cas
// if (casProperties.isCasEnable()) {
// httpSecurity
// // CSRF禁用,因为不使用session
// .csrf().disable()
// // 基于token,所以不需要session
// .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
// // 过滤请求
// .authorizeRequests()
// // 对于登录login 验证码captchaImage 允许匿名访问
// //.antMatchers("/login", "/captchaImage").anonymous()
// .antMatchers(
// HttpMethod.GET,
// "/*.html",
// "/**/*.html",
// "/**/*.css",
// "/**/*.js"
// ).permitAll()
// .antMatchers("/profile/**").anonymous()
// .antMatchers("/common/download**").anonymous()
// .antMatchers("/common/download/resource**").anonymous()
// .antMatchers("/swagger-ui.html").anonymous()
// .antMatchers("/swagger-resources/**").anonymous()
// .antMatchers("/webjars/**").anonymous()
// .antMatchers("/*/api-docs").anonymous()
// .antMatchers("/druid/**").anonymous()
// .antMatchers("/websocket/**").anonymous()
// .antMatchers("/magic/web/**").anonymous()
// .antMatchers("/**/**").anonymous()
// // 除上面外的所有请求全部需要鉴权认证
// .anyRequest().authenticated()
// .and()
// .headers().frameOptions().disable();
// //单点登录登出
// httpSecurity.logout().permitAll().logoutSuccessHandler(logoutSuccessHandler);
// // Custom JWT based security filter
// httpSecurity.addFilter(casAuthenticationFilter())
// .addFilterBefore(authenticationTokenFilter, CasAuthenticationFilter.class)
// //.addFilterBefore(casLogoutFilter(), LogoutFilter.class)
// .addFilterBefore(singleSignOutFilter(), CasAuthenticationFilter.class).exceptionHandling()
// //认证失败
// .authenticationEntryPoint(casAuthenticationEntryPoint());
//
// // 添加CORS filter
// httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
// httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
// // disable page caching
// httpSecurity.headers().cacheControl();
// }
}
/**
......
......@@ -1830,8 +1830,10 @@ public class SjDjjcController extends BaseController
sjFdfxMapper.deleteSjFdfxByZbid(id);
sjFdfxMapper.insertSjFdfxBatch(sjFdfxList);
}
}
//高指标井
sjDjjcService.getGzbjList(jh);
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
......@@ -1841,6 +1843,9 @@ public class SjDjjcController extends BaseController
workbook.close();
}
String name = file.getOriginalFilename();
String type = StringUtils.substringAfterLast(name, ".");
String fileNameYs = name.substring(0,name.lastIndexOf("."));
......@@ -1917,15 +1922,6 @@ public class SjDjjcController extends BaseController
/**
* 计算邻井井组
* @param sjDjjc
* @return
*/
@GetMapping("/jsljjz")
public AjaxResult jsljjz(SjDjjc sjDjjc) throws Exception {
return sjDjjcService.jsljjz(sjDjjc);
}
private static List<SjFdsgcsDcyx> processAndDisplay(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc) {
......@@ -2178,14 +2174,14 @@ public class SjDjjcController extends BaseController
return sjDjjcService.saveLjzl(param);
}
/**
* 计算风险
*/
@PostMapping("/saveFx")
public AjaxResult saveFx(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveLjzl(param);
}
// /**
// * 计算风险
// */
// @PostMapping("/saveFx")
// public AjaxResult saveFx(@RequestBody CommonParam param) throws Exception{
//
// return sjDjjcService.saveLjzl(param);
// }
/**
* 计算钻头
......@@ -2205,6 +2201,18 @@ public class SjDjjcController extends BaseController
return sjDjjcService.saveZjzh(param);
}
/**
* 计算邻井井组
* @param sjDjjc
* @return
*/
@GetMapping("/jsljjz")
public AjaxResult jsljjz(SjDjjc sjDjjc) throws Exception {
return sjDjjcService.jsljjz(sjDjjc);
}
@PostMapping("/exportWord")
public void exportWord(long id,HttpServletResponse response) throws Exception {
SjDjjc sjDjjc = sjDjjcService.selectSjDjjcById(id);
......
......@@ -103,6 +103,47 @@ public class SgfambKcSggy extends BaseEntity
//施工参数条件id
private Long sgcstjid;
//钻压上限
private String zjzysx;
//转速上限
private String zjzssx;
//排量上限
private String zjplsx;
//泵压上限
private String zjbysx;
/** 厂家 */
@Excel(name = "厂家")
private String cj;
/** 尺寸 */
@Excel(name = "尺寸")
private String cc;
/** 水眼 */
@Excel(name = "水眼")
private String sy;
/** 压降 */
@Excel(name = "压降")
private String yj;
/** 钻井液密度 */
@Excel(name = "钻井液密度")
private String zjymd;
/** 刀翼 */
@Excel(name = "刀翼")
private String dy;
/** 复合片 */
@Excel(name = "复合片")
private String ffp;
/** 复合片齿形 */
@Excel(name = "复合片齿形")
private String ffpcx;
}
......@@ -77,7 +77,7 @@ public class SjFdsgcsZjyFdxnb extends BaseEntity
/** 塑性黏度 */
@Excel(name = "塑性黏度")
private String sxnd;
private Double firstNumber;
private List<SjFdsgcsZjyFdxnb> list;
public void setId(Long id)
......
......@@ -2,6 +2,7 @@ package com.zjsgfa.project.zjsgfa.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zjsgfa.framework.aspectj.lang.annotation.Excel;
......@@ -13,6 +14,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-08-20
*/
@Data
public class SjSggyZjyFdxnb extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -85,6 +87,7 @@ public class SjSggyZjyFdxnb extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Double firstNumber;
public void setId(Long id)
{
this.id = id;
......
......@@ -2,6 +2,7 @@ package com.zjsgfa.project.zjsgfa.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zjsgfa.framework.aspectj.lang.annotation.Excel;
......@@ -13,6 +14,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-07-17
*/
@Data
public class SjZjyFdxnb extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -85,6 +87,8 @@ public class SjZjyFdxnb extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Double firstNumber;
public void setId(Long id)
{
this.id = id;
......
......@@ -58,4 +58,7 @@ public interface SjZtcsxxMapper
* @return 结果
*/
public int deleteSjZtcsxxByIds(Long[] ids);
int deleteSjZtcsxxByJhAndKcAndlb(SjZtcsxx sjZtcsxx);
}
......@@ -71,4 +71,7 @@ public interface ISjDjjcService
AjaxResult saveZjzh(CommonParam param);
AjaxResult jsljjz(SjDjjc sjDjjc) throws Exception;
int getGzbjList(String jh) throws Exception;
}
......@@ -329,7 +329,13 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
sjFdsgcs.setZjgccs(zjgccs);
sjFdsgcs.setZjycs(zjycs);
sjFdsgcs.setZyfx(zyfx);
String join = String.join(";", fzqk);
String join = "";
if(fzqk.size()>0){
join = String.join(";", fzqk);
}else {
join = "无";
}
if(ytzl>0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%;";
sjFdsgcs.setTzqk(tzqk);
......@@ -344,9 +350,11 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
if(ytzl>0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs.setTzqk(tzqk);
sjFdsgcs.setLjfzqk("无");
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs.setTzqk(tzqk);
sjFdsgcs.setLjfzqk("无");
}
......@@ -409,7 +417,12 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
sjFdsgcs1.setZjgccs(zjgccs);
sjFdsgcs1.setZjycs(zjycs);
sjFdsgcs1.setZyfx(zyfx);
String join = String.join(";", fzqk);
String join = "";
if(fzqk.size()>0){
join = String.join(";", fzqk);
}else {
join = "无";
}
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%;";
sjFdsgcs1.setTzqk(tzqk);
......@@ -423,18 +436,39 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs1.setTzqk(tzqk);
sjFdsgcs1.setLjfzqk("无");
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs1.setTzqk(tzqk);
sjFdsgcs1.setLjfzqk("无");
}
}
}else {
if(ytzl>=0&& ytzl<100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%";
sjFdsgcs1.setTzqk(tzqk);
sjFdsgcs1.setLjfzqk("无");
}else if(ytzl>=100){
String tzqk="邻井一趟钻完成率为"+ytzl+"%,可实现一趟钻完成";
sjFdsgcs1.setTzqk(tzqk);
sjFdsgcs1.setLjfzqk("无");
}
}
//井段情况
double cs = CxszhUtil.getCs(sjJygjGdsjgdcsList, sjJsjg1.getJs());
csaa=cs;
SjFdsgcsDcyx sjFdsgcsDcyx =new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(sjFdsgcs1.getJh());
sjFdsgcsDcyx.setKscs(previousDepth);
sjFdsgcsDcyx.setJscs(cs);
List<SjFdsgcsDcyx> sjFdsgcsDcyxList=sjFdsgcsDcyxMapper.getListByJh(sjFdsgcsDcyx);
if(sjFdsgcsDcyxList.size()>0){
if(sjFdsgcsDcyxList.size()==1){
sjFdsgcs1.setJdqk(previousDepth+"-"+cs+","+sjFdsgcsDcyxList.get(0).getDcmc());
}else {
sjFdsgcs1.setJdqk(previousDepth+"-"+cs+","+sjFdsgcsDcyxList.get(0).getDcmc()+"-"+sjFdsgcsDcyxList.get(sjFdsgcsDcyxList.size()-1).getDcmc());
}
}
sjFdsgcsMapper.updateSjFdsgcs(sjFdsgcs1);
......
......@@ -7,6 +7,7 @@ import java.util.stream.Collectors;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.common.utils.bean.BeanUtils;
import com.zjsgfa.project.zjsgfa.domain.SjSggyZjyFdxnb;
import com.zjsgfa.project.zjsgfa.domain.SjZjyFdxnb;
import com.zjsgfa.project.zjsgfa.mapper.SjSggyZjyFdxnbMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -78,14 +79,18 @@ public class SjFdsgcsZjyFdxnbServiceImpl implements ISjFdsgcsZjyFdxnbService
);
// 提取井段(去重,按顺序排列)
List<String> wellSegments = list.stream()
// List<String> wellSegments = list.stream()
// .map(SjFdsgcsZjyFdxnb::getJd)
// .distinct().sorted((s1, s2) -> {
// // 提取第一个数值
// int num1 = extractStartNumber(s1);
// int num2 = extractStartNumber(s2);
// return Integer.compare(num1, num2);
// })
// .collect(Collectors.toList());
List<String> wellSegments = list.stream().sorted(Comparator.comparing(SjFdsgcsZjyFdxnb::getFirstNumber))
.map(SjFdsgcsZjyFdxnb::getJd)
.distinct().sorted((s1, s2) -> {
// 提取第一个数值
int num1 = extractStartNumber(s1);
int num2 = extractStartNumber(s2);
return Integer.compare(num1, num2);
})
.distinct()
.collect(Collectors.toList());
// 表格数据:每行对应一个固定项目,每列对应一个井段
......
......@@ -72,14 +72,18 @@ public class SjSggyZjyFdxnbServiceImpl implements ISjSggyZjyFdxnbService
);
// 提取井段(去重,按顺序排列)
List<String> wellSegments = list.stream()
// List<String> wellSegments = list.stream()
// .map(SjSggyZjyFdxnb::getJd)
// .distinct().sorted((s1, s2) -> {
// // 提取第一个数值
// int num1 = extractStartNumber(s1);
// int num2 = extractStartNumber(s2);
// return Integer.compare(num1, num2);
// })
// .collect(Collectors.toList());
List<String> wellSegments = list.stream().sorted(Comparator.comparing(SjSggyZjyFdxnb::getFirstNumber))
.map(SjSggyZjyFdxnb::getJd)
.distinct().sorted((s1, s2) -> {
// 提取第一个数值
int num1 = extractStartNumber(s1);
int num2 = extractStartNumber(s2);
return Integer.compare(num1, num2);
})
.distinct()
.collect(Collectors.toList());
// 表格数据:每行对应一个固定项目,每列对应一个井段
List<Map<String, String>> tableData = new ArrayList<>();
......
......@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.project.zjsgfa.domain.SjFdsgcsZjyFdxnb;
import com.zjsgfa.project.zjsgfa.domain.SjSggyZjyFdxnb;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.SjZjyFdxnbMapper;
......@@ -72,14 +73,18 @@ public class SjZjyFdxnbServiceImpl implements ISjZjyFdxnbService
);
// 提取井段(去重,按顺序排列)
List<String> wellSegments = list.stream()
// List<String> wellSegments = list.stream()
// .map(SjZjyFdxnb::getJd)
// .distinct().sorted((s1, s2) -> {
// // 提取第一个数值
// int num1 = extractStartNumber(s1);
// int num2 = extractStartNumber(s2);
// return Integer.compare(num1, num2);
// })
// .collect(Collectors.toList());
List<String> wellSegments = list.stream().sorted(Comparator.comparing(SjZjyFdxnb::getFirstNumber))
.map(SjZjyFdxnb::getJd)
.distinct().sorted((s1, s2) -> {
// 提取第一个数值
int num1 = extractStartNumber(s1);
int num2 = extractStartNumber(s2);
return Integer.compare(num1, num2);
})
.distinct()
.collect(Collectors.toList());
// 表格数据:每行对应一个固定项目,每列对应一个井段
......
package com.zjsgfa.project.zt.domain.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class ApiResponse {
private int code;
......
......@@ -30,11 +30,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sgcstjid" column="sgcstjid" />
<result property="tjmc" column="tjmc" />
<result property="fxts" column="fxts" />
<result property="zjzysx" column="zjzysx" />
<result property="zjzssx" column="zjzssx" />
<result property="zjplsx" column="zjplsx" />
<result property="zjbysx" column="zjbysx" />
<result property="cj" column="cj" />
<result property="cc" column="cc" />
<result property="sy" column="sy" />
<result property="yj" column="yj" />
<result property="zjymd" column="zjymd" />
<result property="dy" column="dy" />
<result property="ffp" column="ffp" />
<result property="ffpcx" column="ffpcx" />
</resultMap>
<sql id="selectSgfambKcSggyVo">
select id, zbid, kc, ksjs, jsjs, ztxh, zjzy, zjzs, zjpl, zjby, zjzh, zjzhzysx, gjfx, gjyh, zjycs,
zjgccs, created_by, created_time, update_by, update_time, zttjid,zjzhtjid,sgcstjid,tjmc,fxts from sgfamb_kc_sggy
zjgccs, created_by, created_time, update_by, update_time, zttjid,zjzhtjid,sgcstjid,tjmc,fxts,zjzysx,zjzssx,zjplsx,zjbysx,cj,cc,sy,yj,zjymd,dy,ffp,ffpcx from sgfamb_kc_sggy
</sql>
<select id="selectSgfambKcSggyList" parameterType="SgfambKcSggy" resultMap="SgfambKcSggyResult">
......@@ -61,6 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zjzhtjid != null "> and zjzhtjid = #{zjzhtjid}</if>
<if test="sgcstjid != null "> and sgcstjid = #{sgcstjid}</if>
<if test="tjmc != null "> and tjmc = #{tjmc}</if>
<if test="zjzysx != null and zjzysx != ''"> and zjzysx = #{zjzysx}</if>
<if test="zjzssx != null and zjzssx != ''"> and zjzssx = #{zjzssx}</if>
<if test="zjplsx != null and zjplsx != ''"> and zjplsx = #{zjplsx}</if>
<if test="zjbysx != null and zjbysx != ''"> and zjbysx = #{zjbysx}</if>
<if test="cj != null and cj != ''"> and cj = #{cj}</if>
<if test="cc != null and cc != ''"> and cc = #{cc}</if>
<if test="sy != null and sy != ''"> and sy = #{sy}</if>
<if test="yj != null and yj != ''"> and yj = #{yj}</if>
<if test="zjymd != null and zjymd != ''"> and zjymd = #{zjymd}</if>
<if test="dy != null and dy != ''"> and dy = #{dy}</if>
<if test="ffp != null and ffp != ''"> and ffp = #{ffp}</if>
<if test="ffpcx != null and ffpcx != ''"> and ffpcx = #{ffpcx}</if>
</where>
</select>
......@@ -110,6 +134,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sgcstjid != null">sgcstjid,</if>
<if test="tjmc != null">tjmc,</if>
<if test="fxts != null">fxts,</if>
<if test="zjzysx != null">zjzysx,</if>
<if test="zjzssx != null">zjzssx,</if>
<if test="zjbysx != null">zjbysx,</if>
<if test="zjplsx != null">zjplsx,</if>
<if test="cj != null">cj,</if>
<if test="cc != null">cc,</if>
<if test="sy != null">sy,</if>
<if test="yj != null">yj,</if>
<if test="zjymd != null">zjymd,</if>
<if test="dy != null">dy,</if>
<if test="ffp != null">ffp,</if>
<if test="ffpcx != null">ffpcx,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="zbid != null">#{zbid},</if>
......@@ -136,6 +172,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sgcstjid != null">#{sgcstjid},</if>
<if test="tjmc != null">#{tjmc},</if>
<if test="fxts != null">#{fxts},</if>
<if test="zjzysx != null">#{zjzysx},</if>
<if test="zjzssx != null">#{zjzssx},</if>
<if test="zjbysx != null">#{zjbysx},</if>
<if test="zjplsx != null">#{zjplsx},</if>
<if test="cj != null">#{cj},</if>
<if test="cc != null">#{cc},</if>
<if test="sy != null">#{sy},</if>
<if test="yj != null">#{yj},</if>
<if test="zjymd != null">#{zjymd},</if>
<if test="dy != null">#{dy},</if>
<if test="ffp != null">#{ffp},</if>
<if test="ffpcx != null">#{ffpcx},</if>
</trim>
</insert>
......@@ -166,6 +214,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="zjzhtjid != null">zjzhtjid = #{zjzhtjid},</if>
<if test="tjmc != null">tjmc = #{tjmc},</if>
<if test="fxts != null">fxts = #{fxts},</if>
<if test="zjzysx != null">zjzysx = #{zjzysx},</if>
<if test="zjzssx != null">zjzssx = #{zjzssx},</if>
<if test="zjbysx != null">zjbysx = #{zjbysx},</if>
<if test="zjplsx != null">zjplsx = #{zjplsx},</if>
<if test="cj != null">cj = #{cj},</if>
<if test="cc != null">cc = #{cc},</if>
<if test="sy != null">sy = #{sy},</if>
<if test="yj != null">yj = #{yj},</if>
<if test="zjymd != null">zjymd = #{zjymd},</if>
<if test="dy != null">dy = #{dy},</if>
<if test="ffp != null">ffp = #{ffp},</if>
<if test="ffpcx != null">ffpcx = #{ffpcx},</if>
</trim>
where id = #{id}
</update>
......
......@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="cw != null and cw != ''"> and cw = #{cw}</if>
<if test="jds != null "> and jds = #{jds}</if>
</where>
order by jds
</select>
<select id="selectSjDcfxTsyxById" parameterType="Long" resultMap="SjDcfxTsyxResult">
......
......@@ -36,10 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="hsezt" column="hsezt" />
<result property="jhjdzt" column="jhjdzt" />
<result property="flzt" column="flzt" />
<result property="faid" column="faid" />
</resultMap>
<sql id="selectSjDjjcVo">
select id, jh, jb, jx, jkhzb, jkzzb, gzwz, wzcw, ztmd, wzyz, wjfa, created_by, created_time, update_by, update_time, zjgs, zjd, jdhzb, jdzzb, zt, qk, sjzt, ljzlzt, dzfxzt, fxtszt, sggyzt, fdsgzt, jkzt, hsezt, jhjdzt, flzt from sj_djjc
select id, jh, jb, jx, jkhzb, jkzzb, gzwz, wzcw, ztmd, wzyz, wjfa, created_by, created_time, update_by, update_time, zjgs, zjd, jdhzb, jdzzb, zt, qk, sjzt, ljzlzt, dzfxzt, fxtszt, sggyzt, fdsgzt, jkzt, hsezt, jhjdzt, flzt, faid from sj_djjc
</sql>
<select id="selectSjDjjcList" parameterType="SjDjjc" resultMap="SjDjjcResult">
......@@ -119,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hsezt != null">hsezt,</if>
<if test="jhjdzt != null">jhjdzt,</if>
<if test="flzt != null">flzt,</if>
<if test="faid != null">faid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -151,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hsezt != null">#{hsezt},</if>
<if test="jhjdzt != null">#{jhjdzt},</if>
<if test="flzt != null">#{flzt},</if>
<if test="faid != null">#{faid},</if>
</trim>
</insert>
......@@ -186,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hsezt != null">hsezt = #{hsezt},</if>
<if test="jhjdzt != null">jhjdzt = #{jhjdzt},</if>
<if test="flzt != null">flzt = #{flzt},</if>
<if test="faid != null">faid = #{faid},</if>
</trim>
where jh = #{jh}
</update>
......
......@@ -23,7 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSjFdsgcsZjyFdxnbVo">
select id, jh, kc, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd from sj_fdsgcs_zjy_fdxnb
select id, jh, kc, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd,
CAST(TRIM(SUBSTRING_INDEX(jd, '~', 1)) AS DECIMAL(10, 2)) AS first_number from sj_fdsgcs_zjy_fdxnb
</sql>
<select id="selectSjFdsgcsZjyFdxnbList" parameterType="SjFdsgcsZjyFdxnb" resultMap="SjFdsgcsZjyFdxnbResult">
......@@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dql != null and dql != ''"> and dql = #{dql}</if>
<if test="sxnd != null and sxnd != ''"> and sxnd = #{sxnd}</if>
</where>
order by kc, CAST(SUBSTRING_INDEX(jd, '~', 1) AS UNSIGNED)
order by kc, first_number
</select>
<select id="selectSjFdsgcsZjyFdxnbById" parameterType="Long" resultMap="SjFdsgcsZjyFdxnbResult">
......
......@@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
</where>
order by jh ,kc
order by jh ,js
</select>
<select id="selectSjJsjgById" parameterType="Long" resultMap="SjJsjgResult">
......
......@@ -24,10 +24,12 @@ 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="firstNumber" column="first_number" />
</resultMap>
<sql id="selectSjSggyZjyFdxnbVo">
select id, jh, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd, bz, created_by, created_time, update_by, update_time from sj_sggy_zjy_fdxnb
select id, jh, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd, bz, created_by, created_time, update_by, update_time,
CAST(TRIM(SUBSTRING_INDEX(jd, '~', 1)) AS DECIMAL(10, 2)) AS first_number from sj_sggy_zjy_fdxnb
</sql>
<select id="selectSjSggyZjyFdxnbList" parameterType="SjSggyZjyFdxnb" resultMap="SjSggyZjyFdxnbResult">
......@@ -50,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
</where>
order by jd
order by first_number
</select>
<select id="selectSjSggyZjyFdxnbById" parameterType="Long" resultMap="SjSggyZjyFdxnbResult">
......
......@@ -24,10 +24,12 @@ 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="firstNumber" column="first_number" />
</resultMap>
<sql id="selectSjZjyFdxnbVo">
select id, jh, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd, bz, created_by, created_time, update_by, update_time from sj_zjy_fdxnb
select id, jh, jd, md, msldnd, apilsl, apinb, jql, ph, hsl, zgh, mzxs, dql, sxnd, bz, created_by, created_time, update_by, update_time,
CAST(TRIM(SUBSTRING_INDEX(jd, '~', 1)) AS DECIMAL(10, 2)) AS first_number from sj_zjy_fdxnb
</sql>
<select id="selectSjZjyFdxnbList" parameterType="SjZjyFdxnb" resultMap="SjZjyFdxnbResult">
......@@ -50,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
</where>
order by jd
order by first_number
</select>
<select id="selectSjZjyFdxnbById" parameterType="Long" resultMap="SjZjyFdxnbResult">
......
......@@ -88,4 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteSjZtcsxxByJhAndKcAndlb">
delete from sj_ztcsxx where jh=#{jh} and kc=#{kc} and lb=#{lb}
</delete>
</mapper>
\ No newline at end of file
......@@ -69,6 +69,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="deleteSjZtxxByZtxx">
delete from sj_ztxx where jh = #{jh} and kc = #{kc}
delete from sj_ztxx where jh = #{jh} and kc = #{kc} and lb = #{lb}
</delete>
</mapper>
\ No newline at end of file
......@@ -269,7 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
kc
ORDER BY
kc
) d on a.JH = d.jh
) d on a.JH = d.jh and c.kc=d.kc
where 1=1
<if test="jdhzb!=null">
and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl}
......
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