master
parent
403461a6d0
commit
75cff9277e
@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: cn.hutool:hutool-all:5.8.15">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/cn/hutool/hutool-all/5.8.15/hutool-all-5.8.15.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/cn/hutool/hutool-all/5.8.15/hutool-all-5.8.15-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/cn/hutool/hutool-all/5.8.15/hutool-all-5.8.15-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: com.google.guava:guava:20.0">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/com/google/guava/guava/20.0/guava-20.0.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/com/google/guava/guava/20.0/guava-20.0-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/com/google/guava/guava/20.0/guava-20.0-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||||||
<component name="libraryTable">
|
|
||||||
<library name="Maven: org.modelmapper:modelmapper:2.3.5">
|
|
||||||
<CLASSES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/org/modelmapper/modelmapper/2.3.5/modelmapper-2.3.5.jar!/" />
|
|
||||||
</CLASSES>
|
|
||||||
<JAVADOC>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/org/modelmapper/modelmapper/2.3.5/modelmapper-2.3.5-javadoc.jar!/" />
|
|
||||||
</JAVADOC>
|
|
||||||
<SOURCES>
|
|
||||||
<root url="jar://$PROJECT_DIR$/../../Program Files/apache-maven-3.8.7/repository/org/modelmapper/modelmapper/2.3.5/modelmapper-2.3.5-sources.jar!/" />
|
|
||||||
</SOURCES>
|
|
||||||
</library>
|
|
||||||
</component>
|
|
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
|
|
||||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
|
|
@ -0,0 +1,254 @@
|
|||||||
|
package com.dsic.gj_erp.bean.fd;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 船只基本表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="DmCzjbb对象", description="船只基本表")
|
||||||
|
public class DmCzjbb implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
private String fjqzcjs;
|
||||||
|
|
||||||
|
private String cjs;
|
||||||
|
|
||||||
|
private String clbs10;
|
||||||
|
|
||||||
|
private String yqbs02;
|
||||||
|
|
||||||
|
private String zfzy;
|
||||||
|
|
||||||
|
private String yzbs;
|
||||||
|
|
||||||
|
private String xsrq;
|
||||||
|
|
||||||
|
private String gxcjbs;
|
||||||
|
|
||||||
|
private String yqbs06;
|
||||||
|
|
||||||
|
private String ph;
|
||||||
|
|
||||||
|
private String cwfzrq;
|
||||||
|
|
||||||
|
private String yqbs04;
|
||||||
|
|
||||||
|
private String clbs11;
|
||||||
|
|
||||||
|
private String clbs09;
|
||||||
|
|
||||||
|
private String dyjdy;
|
||||||
|
|
||||||
|
private String yqbs03;
|
||||||
|
|
||||||
|
private String txzl1;
|
||||||
|
|
||||||
|
private String ph6;
|
||||||
|
|
||||||
|
private String lrry;
|
||||||
|
|
||||||
|
private String gjfkyz;
|
||||||
|
|
||||||
|
private String ph3;
|
||||||
|
|
||||||
|
private String yqbs05;
|
||||||
|
|
||||||
|
private String czmc;
|
||||||
|
|
||||||
|
private String yqbs;
|
||||||
|
|
||||||
|
private String czjc;
|
||||||
|
|
||||||
|
private String clbs12;
|
||||||
|
|
||||||
|
private String txgy3;
|
||||||
|
|
||||||
|
private String txcz;
|
||||||
|
|
||||||
|
private String gcqy1;
|
||||||
|
|
||||||
|
private String hcbs01;
|
||||||
|
|
||||||
|
private String yqbs09;
|
||||||
|
|
||||||
|
private String pjfs;
|
||||||
|
|
||||||
|
private String hcbs03;
|
||||||
|
|
||||||
|
private String jswgbs;
|
||||||
|
|
||||||
|
private String txzl2;
|
||||||
|
|
||||||
|
private String yqxebs;
|
||||||
|
|
||||||
|
private String lrrq;
|
||||||
|
|
||||||
|
private Integer gjxtws;
|
||||||
|
|
||||||
|
private String gcqy;
|
||||||
|
|
||||||
|
private String ph4;
|
||||||
|
|
||||||
|
private String azqy3;
|
||||||
|
|
||||||
|
private String yqbs12;
|
||||||
|
|
||||||
|
private String txjdy;
|
||||||
|
|
||||||
|
private String yqbs08;
|
||||||
|
|
||||||
|
private String yqdetqryTx;
|
||||||
|
|
||||||
|
private String yqbs10;
|
||||||
|
|
||||||
|
private String hcbs02;
|
||||||
|
|
||||||
|
private String txgy2;
|
||||||
|
|
||||||
|
private String sctrq;
|
||||||
|
|
||||||
|
private String xmbh;
|
||||||
|
|
||||||
|
private String shrq;
|
||||||
|
|
||||||
|
private Integer sl;
|
||||||
|
|
||||||
|
private String gjfjpkfs;
|
||||||
|
|
||||||
|
private String wgbs;
|
||||||
|
|
||||||
|
private String hcbs04;
|
||||||
|
|
||||||
|
private String ph1;
|
||||||
|
|
||||||
|
private String sctrqbz;
|
||||||
|
|
||||||
|
private String yqbs07;
|
||||||
|
|
||||||
|
private String yqbs11;
|
||||||
|
|
||||||
|
private String gxhqby;
|
||||||
|
|
||||||
|
private String hcbs10;
|
||||||
|
|
||||||
|
private String clbs03;
|
||||||
|
|
||||||
|
private String azqy2;
|
||||||
|
|
||||||
|
private String qcbs;
|
||||||
|
|
||||||
|
private String ph7;
|
||||||
|
|
||||||
|
private String clbs01;
|
||||||
|
|
||||||
|
private String gjfjthxz;
|
||||||
|
|
||||||
|
private String hcbs05;
|
||||||
|
|
||||||
|
private String jssxrq;
|
||||||
|
|
||||||
|
@TableId(value = "czbh", type = IdType.ASSIGN_UUID)
|
||||||
|
private String czbh;
|
||||||
|
|
||||||
|
private String qcbs1;
|
||||||
|
|
||||||
|
private String hcbs07;
|
||||||
|
|
||||||
|
private String hcbs09;
|
||||||
|
|
||||||
|
private String gxfjbz;
|
||||||
|
|
||||||
|
private String txgy1;
|
||||||
|
|
||||||
|
private String clbs02;
|
||||||
|
|
||||||
|
private String cdmc;
|
||||||
|
|
||||||
|
private String cwzt;
|
||||||
|
|
||||||
|
private String cimsBs;
|
||||||
|
|
||||||
|
private String kgrq;
|
||||||
|
|
||||||
|
private String cwfzsm;
|
||||||
|
|
||||||
|
private String gxhbbs;
|
||||||
|
|
||||||
|
private String sfqy;
|
||||||
|
|
||||||
|
private String hcbs06;
|
||||||
|
|
||||||
|
private String hcbs08;
|
||||||
|
|
||||||
|
private Double gcxs;
|
||||||
|
|
||||||
|
private String yqdetqrqTx;
|
||||||
|
|
||||||
|
private String cjmc;
|
||||||
|
|
||||||
|
private String azqy1;
|
||||||
|
|
||||||
|
private Double gzjxs;
|
||||||
|
|
||||||
|
private String qzjgrq;
|
||||||
|
|
||||||
|
private String zztczbh;
|
||||||
|
|
||||||
|
private String ycbs;
|
||||||
|
|
||||||
|
private String ph2;
|
||||||
|
|
||||||
|
private String clbs05;
|
||||||
|
|
||||||
|
private String kgrqbz;
|
||||||
|
|
||||||
|
private String hcbs11;
|
||||||
|
|
||||||
|
private String xscz;
|
||||||
|
|
||||||
|
private String gjgxbz;
|
||||||
|
|
||||||
|
private String clbs07;
|
||||||
|
|
||||||
|
private String bz;
|
||||||
|
|
||||||
|
private String yqbs01;
|
||||||
|
|
||||||
|
private String qcbs2;
|
||||||
|
|
||||||
|
private String xl;
|
||||||
|
|
||||||
|
private String txzl3;
|
||||||
|
|
||||||
|
private String jssxsm;
|
||||||
|
|
||||||
|
private String ph8;
|
||||||
|
|
||||||
|
private String ph5;
|
||||||
|
|
||||||
|
private String clbs06;
|
||||||
|
|
||||||
|
private String hcbs12;
|
||||||
|
|
||||||
|
private String clbs04;
|
||||||
|
|
||||||
|
private String gjjdy;
|
||||||
|
|
||||||
|
private String clbs08;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.dsic.gj_erp.controller.fd;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dsic.gj_erp.annotation.AuthFunction;
|
||||||
|
import com.dsic.gj_erp.bean.ResultBean;
|
||||||
|
import com.dsic.gj_erp.bean.fd.TppsQk;
|
||||||
|
import com.dsic.gj_erp.exception.CustomException;
|
||||||
|
import com.dsic.gj_erp.service.fd.impl.TpImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/tpb")
|
||||||
|
public class TpbController {
|
||||||
|
@Autowired
|
||||||
|
TpImpl tpImpl;
|
||||||
|
|
||||||
|
@PostMapping("/findTPxqjh")
|
||||||
|
@AuthFunction
|
||||||
|
public ResultBean findTPxqjh(HttpServletRequest req, @RequestBody Map<String, Object> map) throws Exception, CustomException {
|
||||||
|
List<Map> list = tpImpl.findTPxqjh(map);
|
||||||
|
return new ResultBean(list);
|
||||||
|
}
|
||||||
|
@PostMapping("/findTppsQk")
|
||||||
|
@AuthFunction
|
||||||
|
public ResultBean findTppsQk(HttpServletRequest req, @RequestBody Map<String, Object> map) throws Exception, CustomException {
|
||||||
|
List<TppsQk> list = tpImpl.findTppsQk(map);
|
||||||
|
return new ResultBean(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.dsic.gj_erp.mapper.fd;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.dsic.gj_erp.bean.fd.DmCzjbb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 船只基本表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
public interface DmCzjbbMapper extends BaseMapper<DmCzjbb> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,127 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.dsic.xzerp.dao.fd.DmCzjbbMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.dsic.xzerp.bean.fd.DmCzjbb">
|
||||||
|
<id column="czbh" property="czbh" />
|
||||||
|
<result column="fjqzcjs" property="fjqzcjs" />
|
||||||
|
<result column="cjs" property="cjs" />
|
||||||
|
<result column="clbs10" property="clbs10" />
|
||||||
|
<result column="yqbs02" property="yqbs02" />
|
||||||
|
<result column="zfzy" property="zfzy" />
|
||||||
|
<result column="yzbs" property="yzbs" />
|
||||||
|
<result column="xsrq" property="xsrq" />
|
||||||
|
<result column="gxcjbs" property="gxcjbs" />
|
||||||
|
<result column="yqbs06" property="yqbs06" />
|
||||||
|
<result column="ph" property="ph" />
|
||||||
|
<result column="cwfzrq" property="cwfzrq" />
|
||||||
|
<result column="yqbs04" property="yqbs04" />
|
||||||
|
<result column="clbs11" property="clbs11" />
|
||||||
|
<result column="clbs09" property="clbs09" />
|
||||||
|
<result column="dyjdy" property="dyjdy" />
|
||||||
|
<result column="yqbs03" property="yqbs03" />
|
||||||
|
<result column="txzl1" property="txzl1" />
|
||||||
|
<result column="ph6" property="ph6" />
|
||||||
|
<result column="lrry" property="lrry" />
|
||||||
|
<result column="gjfkyz" property="gjfkyz" />
|
||||||
|
<result column="ph3" property="ph3" />
|
||||||
|
<result column="yqbs05" property="yqbs05" />
|
||||||
|
<result column="czmc" property="czmc" />
|
||||||
|
<result column="yqbs" property="yqbs" />
|
||||||
|
<result column="czjc" property="czjc" />
|
||||||
|
<result column="clbs12" property="clbs12" />
|
||||||
|
<result column="txgy3" property="txgy3" />
|
||||||
|
<result column="txcz" property="txcz" />
|
||||||
|
<result column="gcqy1" property="gcqy1" />
|
||||||
|
<result column="hcbs01" property="hcbs01" />
|
||||||
|
<result column="yqbs09" property="yqbs09" />
|
||||||
|
<result column="pjfs" property="pjfs" />
|
||||||
|
<result column="hcbs03" property="hcbs03" />
|
||||||
|
<result column="jswgbs" property="jswgbs" />
|
||||||
|
<result column="txzl2" property="txzl2" />
|
||||||
|
<result column="yqxebs" property="yqxebs" />
|
||||||
|
<result column="lrrq" property="lrrq" />
|
||||||
|
<result column="gjxtws" property="gjxtws" />
|
||||||
|
<result column="gcqy" property="gcqy" />
|
||||||
|
<result column="ph4" property="ph4" />
|
||||||
|
<result column="azqy3" property="azqy3" />
|
||||||
|
<result column="yqbs12" property="yqbs12" />
|
||||||
|
<result column="txjdy" property="txjdy" />
|
||||||
|
<result column="yqbs08" property="yqbs08" />
|
||||||
|
<result column="yqdetqry_tx" property="yqdetqryTx" />
|
||||||
|
<result column="yqbs10" property="yqbs10" />
|
||||||
|
<result column="hcbs02" property="hcbs02" />
|
||||||
|
<result column="txgy2" property="txgy2" />
|
||||||
|
<result column="sctrq" property="sctrq" />
|
||||||
|
<result column="xmbh" property="xmbh" />
|
||||||
|
<result column="shrq" property="shrq" />
|
||||||
|
<result column="sl" property="sl" />
|
||||||
|
<result column="gjfjpkfs" property="gjfjpkfs" />
|
||||||
|
<result column="wgbs" property="wgbs" />
|
||||||
|
<result column="hcbs04" property="hcbs04" />
|
||||||
|
<result column="ph1" property="ph1" />
|
||||||
|
<result column="sctrqbz" property="sctrqbz" />
|
||||||
|
<result column="yqbs07" property="yqbs07" />
|
||||||
|
<result column="yqbs11" property="yqbs11" />
|
||||||
|
<result column="gxhqby" property="gxhqby" />
|
||||||
|
<result column="hcbs10" property="hcbs10" />
|
||||||
|
<result column="clbs03" property="clbs03" />
|
||||||
|
<result column="azqy2" property="azqy2" />
|
||||||
|
<result column="qcbs" property="qcbs" />
|
||||||
|
<result column="ph7" property="ph7" />
|
||||||
|
<result column="clbs01" property="clbs01" />
|
||||||
|
<result column="gjfjthxz" property="gjfjthxz" />
|
||||||
|
<result column="hcbs05" property="hcbs05" />
|
||||||
|
<result column="jssxrq" property="jssxrq" />
|
||||||
|
<result column="qcbs1" property="qcbs1" />
|
||||||
|
<result column="hcbs07" property="hcbs07" />
|
||||||
|
<result column="hcbs09" property="hcbs09" />
|
||||||
|
<result column="gxfjbz" property="gxfjbz" />
|
||||||
|
<result column="txgy1" property="txgy1" />
|
||||||
|
<result column="clbs02" property="clbs02" />
|
||||||
|
<result column="cdmc" property="cdmc" />
|
||||||
|
<result column="cwzt" property="cwzt" />
|
||||||
|
<result column="cims_bs" property="cimsBs" />
|
||||||
|
<result column="kgrq" property="kgrq" />
|
||||||
|
<result column="cwfzsm" property="cwfzsm" />
|
||||||
|
<result column="gxhbbs" property="gxhbbs" />
|
||||||
|
<result column="sfqy" property="sfqy" />
|
||||||
|
<result column="hcbs06" property="hcbs06" />
|
||||||
|
<result column="hcbs08" property="hcbs08" />
|
||||||
|
<result column="gcxs" property="gcxs" />
|
||||||
|
<result column="yqdetqrq_tx" property="yqdetqrqTx" />
|
||||||
|
<result column="cjmc" property="cjmc" />
|
||||||
|
<result column="azqy1" property="azqy1" />
|
||||||
|
<result column="gzjxs" property="gzjxs" />
|
||||||
|
<result column="qzjgrq" property="qzjgrq" />
|
||||||
|
<result column="zztczbh" property="zztczbh" />
|
||||||
|
<result column="ycbs" property="ycbs" />
|
||||||
|
<result column="ph2" property="ph2" />
|
||||||
|
<result column="clbs05" property="clbs05" />
|
||||||
|
<result column="kgrqbz" property="kgrqbz" />
|
||||||
|
<result column="hcbs11" property="hcbs11" />
|
||||||
|
<result column="xscz" property="xscz" />
|
||||||
|
<result column="gjgxbz" property="gjgxbz" />
|
||||||
|
<result column="clbs07" property="clbs07" />
|
||||||
|
<result column="bz" property="bz" />
|
||||||
|
<result column="yqbs01" property="yqbs01" />
|
||||||
|
<result column="qcbs2" property="qcbs2" />
|
||||||
|
<result column="xl" property="xl" />
|
||||||
|
<result column="txzl3" property="txzl3" />
|
||||||
|
<result column="jssxsm" property="jssxsm" />
|
||||||
|
<result column="ph8" property="ph8" />
|
||||||
|
<result column="ph5" property="ph5" />
|
||||||
|
<result column="clbs06" property="clbs06" />
|
||||||
|
<result column="hcbs12" property="hcbs12" />
|
||||||
|
<result column="clbs04" property="clbs04" />
|
||||||
|
<result column="gjjdy" property="gjjdy" />
|
||||||
|
<result column="clbs08" property="clbs08" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
fjqzcjs, cjs, clbs10, yqbs02, zfzy, yzbs, xsrq, gxcjbs, yqbs06, ph, cwfzrq, yqbs04, clbs11, clbs09, dyjdy, yqbs03, txzl1, ph6, lrry, gjfkyz, ph3, yqbs05, czmc, yqbs, czjc, clbs12, txgy3, txcz, gcqy1, hcbs01, yqbs09, pjfs, hcbs03, jswgbs, txzl2, yqxebs, lrrq, gjxtws, gcqy, ph4, azqy3, yqbs12, txjdy, yqbs08, yqdetqry_tx, yqbs10, hcbs02, txgy2, sctrq, xmbh, shrq, sl, gjfjpkfs, wgbs, hcbs04, ph1, sctrqbz, yqbs07, yqbs11, gxhqby, hcbs10, clbs03, azqy2, qcbs, ph7, clbs01, gjfjthxz, hcbs05, jssxrq, czbh, qcbs1, hcbs07, hcbs09, gxfjbz, txgy1, clbs02, cdmc, cwzt, cims_bs, kgrq, cwfzsm, gxhbbs, sfqy, hcbs06, hcbs08, gcxs, yqdetqrq_tx, cjmc, azqy1, gzjxs, qzjgrq, zztczbh, ycbs, ph2, clbs05, kgrqbz, hcbs11, xscz, gjgxbz, clbs07, bz, yqbs01, qcbs2, xl, txzl3, jssxsm, ph8, ph5, clbs06, hcbs12, clbs04, gjjdy, clbs08
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.dsic.xzerp.dao.fd.DmXqdwcjcdMapper">
|
||||||
|
|
||||||
|
<!-- 通用查询映射结果 -->
|
||||||
|
<resultMap id="BaseResultMap" type="com.dsic.xzerp.bean.fd.DmXqdwcjcd">
|
||||||
|
<id column="cdid" property="cdid" />
|
||||||
|
<result column="cdmc" property="cdmc" />
|
||||||
|
<result column="dwbm" property="dwbm" />
|
||||||
|
<result column="bz" property="bz" />
|
||||||
|
<result column="dh" property="dh" />
|
||||||
|
<result column="cdlx" property="cdlx" />
|
||||||
|
<result column="cjmc" property="cjmc" />
|
||||||
|
<result column="fzry" property="fzry" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 通用查询结果列 -->
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
cdmc, dwbm, bz, dh, cdid, cdlx, cjmc, fzry
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -1,257 +1,31 @@
|
|||||||
package com.dsic.gj_erp.service.fd;
|
package com.dsic.gj_erp.service.fd;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.dsic.gj_erp.bean.fd.DmCzfddyb;
|
||||||
import com.dsic.gj_erp.bean.fd.*;
|
import com.dsic.gj_erp.bean.fd.ExcelExport;
|
||||||
import com.dsic.gj_erp.bean.jcsj.DmCbxxp;
|
|
||||||
import com.dsic.gj_erp.bean.sy.SyDictItem;
|
|
||||||
import com.dsic.gj_erp.bean.sy.SyDzbmp;
|
|
||||||
import com.dsic.gj_erp.mapper.fd.DmCzfddybMapper;
|
|
||||||
import com.dsic.gj_erp.service.jcsj.DmCbxxpService;
|
|
||||||
import com.dsic.gj_erp.service.sy.SyDictItemService;
|
|
||||||
import com.dsic.gj_erp.service.sy.impl.SyDzbmpService;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.beans.PropertyDescriptor;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@Service
|
/**
|
||||||
@AllArgsConstructor
|
* <p>
|
||||||
public class DmCzfddybService extends ServiceImpl<DmCzfddybMapper,DmCzfddyb> {
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
public interface DmCzfddybService extends IService<DmCzfddyb> {
|
||||||
|
|
||||||
|
|
||||||
private final SyDictItemService syDictItemService;
|
Map uploadFd(HttpServletRequest httpRequest, List<ExcelExport> excelList, String czbh, String isupload) throws Exception;
|
||||||
private final TpImpl tpImpl;
|
Map getCzFdBase(HttpServletRequest req,Map map) ;
|
||||||
private final DmCbxxpService czjbbService;
|
|
||||||
private final DmXqdwcjcdService dmXqdwcjcdService;
|
|
||||||
private final SyDzbmpService syDzbmpService;
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
Map getList(Map map) throws Exception;
|
||||||
public Map uploadFd(HttpServletRequest httpRequest, List<ExcelExport> excelList, String czbh, String isupload) throws Exception {
|
Map getTpBase( HttpServletRequest req,Map map) throws Exception;
|
||||||
Map rMap = new HashMap();
|
|
||||||
czbh=czbh+"#";
|
|
||||||
if ("01".equals(isupload)) {
|
|
||||||
// 查询是否 有值
|
|
||||||
List<DmCzfddyb> czbh1 = this.list(new QueryWrapper<DmCzfddyb>().eq("czbh", czbh));
|
|
||||||
if (czbh1.size() > 0) {
|
|
||||||
rMap.put("zt", "01");
|
|
||||||
return rMap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.remove(new QueryWrapper<DmCzfddyb>().eq("CZBH", czbh));
|
|
||||||
List<DmCzfddyb> addList = new ArrayList<>();
|
|
||||||
int row = 0;
|
|
||||||
for (int i = 0; i < excelList.size(); i++) {
|
|
||||||
ExcelExport e = excelList.get(i);
|
|
||||||
Class cls = e.getClass();
|
|
||||||
Field[] fields = cls.getDeclaredFields();
|
|
||||||
for (int j = 0; j < fields.length; j++) {
|
|
||||||
String fdh = "";
|
|
||||||
int col;
|
|
||||||
Field f = fields[j];
|
|
||||||
f.setAccessible(true);
|
|
||||||
try {
|
|
||||||
fdh = (String) f.get(e);
|
|
||||||
} catch (IllegalAccessException ex) {
|
|
||||||
throw new RuntimeException(ex);
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotBlank(fdh)) {
|
|
||||||
DmCzfddyb czfddyb = new DmCzfddyb();
|
|
||||||
czfddyb.setCzbh(czbh);
|
|
||||||
czfddyb.setFdh(fdh);
|
|
||||||
czfddyb.setFrow(i);
|
|
||||||
String colName = f.getName();
|
|
||||||
col = Integer.parseInt(colName.substring(colName.length() - 3));
|
|
||||||
czfddyb.setFcol(col);
|
|
||||||
addList.add(czfddyb);
|
|
||||||
}
|
|
||||||
//System.out.println("属性名:" + f.getName() + " 属性值:" + );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.saveBatch(addList);
|
|
||||||
return rMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Map getCzFdBase(HttpServletRequest req, Map map) {
|
|
||||||
Map rMap = new HashMap();
|
|
||||||
String bmbm = (String)req.getAttribute("bmbm");
|
|
||||||
List<DmCbxxp> czbhs;
|
|
||||||
if(StringUtils.isNotBlank(bmbm)&& bmbm.length()>2){
|
|
||||||
|
|
||||||
czbhs = czjbbService.list(new QueryWrapper<DmCbxxp>()
|
|
||||||
.select("replace(cbbm,'#','') AS cbbm")
|
|
||||||
.ne("isnull(wgbs,'N')","Y").eq(" isnull(cims_bs,'')","Y").
|
|
||||||
eq("left(gcqy,1)","0").
|
|
||||||
orderBy(true, true, "wgbs", "left(czbh,charindex('-',cbbm)-1)", "len(cbbm)", "czbh"
|
|
||||||
));
|
|
||||||
}else{
|
|
||||||
czbhs = czjbbService.list(new QueryWrapper<DmCbxxp>()
|
|
||||||
.select("replace(cbbm,'#','') AS cbbm")
|
|
||||||
.gt("charindex('-',cbbm)-1",0)
|
|
||||||
.orderBy(true, true, "wgbs", "left(cbbm,charindex('-',cbbm)-1)", "len(cbbm)", "cbbm"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 只显示海工名船 简称不等于空
|
|
||||||
rMap.put("czbhs", czbhs);
|
|
||||||
|
|
||||||
|
Map getListFdMx(Map map) throws Exception;
|
||||||
|
|
||||||
return rMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map getList(Map map) throws Exception {
|
|
||||||
Map returnMap = new HashMap();
|
|
||||||
List<ExcelExport> returnList = new ArrayList<>();
|
|
||||||
QueryWrapper<DmCzfddyb> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("CZBH", map.get("czbh")+"#");
|
|
||||||
List<DmCzfddyb> list = this.list(queryWrapper);
|
|
||||||
queryWrapper.select("max(frow) as frow ", "max(fcol)as fcol");
|
|
||||||
DmCzfddyb one = (DmCzfddyb) this.getOne(queryWrapper);
|
|
||||||
if (one != null) {
|
|
||||||
int row = one.getFrow();
|
|
||||||
int col = one.getFcol();
|
|
||||||
for (int i = 0; i <= row; i++) {
|
|
||||||
ExcelExport excelExport = new ExcelExport();
|
|
||||||
int tempi = i;
|
|
||||||
List<DmCzfddyb> collect = list.stream().filter(fst -> fst.getFrow() == tempi).collect(Collectors.toList());
|
|
||||||
for (int y = 0; y <= col; y++) {
|
|
||||||
int tempy = y;
|
|
||||||
DmCzfddyb czfddyb = collect.stream().filter(fst -> fst.getFcol() == tempy).findFirst().orElse(null);
|
|
||||||
if (null != czfddyb) {
|
|
||||||
PropertyDescriptor propertyDescriptor = new PropertyDescriptor("column" + String.format("%03d", czfddyb.getFcol()), excelExport.getClass());
|
|
||||||
Method setMethod = propertyDescriptor.getWriteMethod();
|
|
||||||
// 调用指定对象set方法
|
|
||||||
setMethod.invoke(excelExport, czfddyb.getFdh());
|
|
||||||
// System.out.println(object.getName());// 输出Jack Chen
|
|
||||||
}
|
|
||||||
}
|
|
||||||
returnList.add(excelExport);
|
|
||||||
}
|
|
||||||
returnMap.put("data", returnList);
|
|
||||||
returnMap.put("col", col);
|
|
||||||
}
|
|
||||||
return returnMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map getTpBase( HttpServletRequest req,Map map) throws Exception {
|
|
||||||
Map rMap = new HashMap();
|
|
||||||
String bmbm = (String)req.getAttribute("bmbm");
|
|
||||||
List<DmCbxxp> czbhs;
|
|
||||||
List<DmXqdwcjcd>cdmcs;
|
|
||||||
List<DmXqdwcjcd>cjmcs;
|
|
||||||
if(StringUtils.isNotBlank(bmbm)&& bmbm.length()>2){
|
|
||||||
|
|
||||||
czbhs = czjbbService.list(new QueryWrapper<DmCbxxp>()
|
|
||||||
.select("replace(czbh,'#','') AS czbh")
|
|
||||||
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "")
|
|
||||||
.ne("isnull(wgbs,'N')","Y").eq(" isnull(cims_bs,'')","Y").
|
|
||||||
eq("left(gcqy,1)","0").
|
|
||||||
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
|
||||||
));
|
|
||||||
cdmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().eq("dwbm","P30000").orderBy(true,true,"cdmc"));
|
|
||||||
cjmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().select("DISTINCT cjmc as cjmc").eq("dwbm","P30000").orderBy(true,true,"cjmc"));
|
|
||||||
}else{
|
|
||||||
czbhs = czjbbService.list(new QueryWrapper<DmCbxxp>()
|
|
||||||
.select("replace(czbh,'#','') AS czbh")
|
|
||||||
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "").
|
|
||||||
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
|
||||||
));
|
|
||||||
cdmcs=dmXqdwcjcdService.list();
|
|
||||||
cjmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().select("DISTINCT cjmc as cjmc"));
|
|
||||||
}
|
|
||||||
|
|
||||||
//作业阶段
|
|
||||||
List<SyDzbmp> zyjds = syDzbmpService.list(new QueryWrapper<SyDzbmp>().eq("bml", "ZYJD"));
|
|
||||||
//部件类别
|
|
||||||
List<SyDictItem> bjlbs = syDictItemService.list(new QueryWrapper<SyDictItem>().eq("bmlb", "TPLX"));
|
|
||||||
// List<Map> xqdws = mpZzdwjbbMapper.findxqdwAll();
|
|
||||||
List<SyDictItem> bmbms = syDictItemService.list(new QueryWrapper<SyDictItem>().eq("bmlb", "bmbm").in("bm","01","02","03","04"));
|
|
||||||
rMap.put("czbhs", czbhs);
|
|
||||||
rMap.put("zyjds", zyjds);
|
|
||||||
rMap.put("bjlbs", bjlbs);
|
|
||||||
// rMap.put("xqdws", xqdws);
|
|
||||||
rMap.put("bmbms", bmbms);
|
|
||||||
rMap.put("cdmcs", cdmcs);
|
|
||||||
rMap.put("cjmcs", cjmcs);
|
|
||||||
return rMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map getListFdMx(Map map) throws Exception {
|
|
||||||
// Map returnMap = new HashMap();
|
|
||||||
Map returnMap = this.getList(map);
|
|
||||||
|
|
||||||
List<TppsQk> tppsQks = tpImpl.findTppsQk(map);
|
|
||||||
|
|
||||||
Map<String, List<TppsQk>> collect = tppsQks.stream().collect(
|
|
||||||
Collectors.groupingBy(
|
|
||||||
score -> score.getFdh()+'-'+score.getTplx()
|
|
||||||
));
|
|
||||||
List<FdBean> fdBeans=new ArrayList<>();
|
|
||||||
for(Map.Entry<String, List<TppsQk>> entry : collect.entrySet()){
|
|
||||||
FdBean fdBean=new FdBean();
|
|
||||||
String mapKey = entry.getKey();
|
|
||||||
String color="";
|
|
||||||
String[] parts = mapKey.split("-");
|
|
||||||
String fdh=parts[0];
|
|
||||||
String tplx=parts[1];
|
|
||||||
// if(a.compareTo(b) < 1){
|
|
||||||
// System.out.println("a小于等于b");
|
|
||||||
// }
|
|
||||||
|
|
||||||
BigDecimal xqslSum=entry.getValue().stream().map(s-> s.getXqsl()).reduce(BigDecimal.ZERO,BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
BigDecimal psslSum=entry.getValue().stream().map(s-> s.getPssl()).reduce(BigDecimal.ZERO,BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
||||||
List<TppsQk> rqList=entry.getValue();
|
|
||||||
boolean flag=false;
|
|
||||||
// if(fdh.equals("ZL04")){
|
|
||||||
// rqList.get(0).setQfxqrq("2022/04/13");
|
|
||||||
// }
|
|
||||||
for(TppsQk q :rqList){
|
|
||||||
if(StringUtils.isNotBlank(q.getQfxqrq())){
|
|
||||||
flag=true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(xqslSum.compareTo(BigDecimal.ZERO)==0 ){
|
|
||||||
|
|
||||||
}else{
|
|
||||||
BigDecimal result =psslSum.divide(xqslSum,2,BigDecimal.ROUND_HALF_UP);
|
|
||||||
System.out.println("result = " + result +"xqsl"+xqslSum +"pssl"+psslSum+"fhd"+fdh);
|
|
||||||
|
|
||||||
if(result.compareTo(new BigDecimal("0.9"))> -1 ){ // result > =0.9
|
|
||||||
if("0201".equals(tplx)){
|
|
||||||
color="green";
|
|
||||||
}
|
|
||||||
}else if (result.compareTo(new BigDecimal("0.5"))>-1 && result.compareTo(new BigDecimal("0.9"))<1 ) {
|
|
||||||
if("0201".equals(tplx)){
|
|
||||||
color="yellow";
|
|
||||||
}
|
|
||||||
}else if( result.compareTo(new BigDecimal("0.5"))<1 && flag ){
|
|
||||||
if("0201".equals(tplx)){
|
|
||||||
color="red";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.out.println("result = " + result +"xqsl"+xqslSum +"pssl"+psslSum+"fhd"+fdh+"COLOR"+color);
|
|
||||||
}
|
|
||||||
fdBean.setFdh(fdh);
|
|
||||||
|
|
||||||
fdBean.setTplx(tplx);
|
|
||||||
|
|
||||||
fdBean.setColor(color);
|
|
||||||
|
|
||||||
fdBeans.add(fdBean);
|
|
||||||
}
|
|
||||||
returnMap.put("fd", fdBeans);
|
|
||||||
returnMap.put("fdqk", tppsQks);
|
|
||||||
return returnMap;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.dsic.gj_erp.service.fd;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.dsic.gj_erp.bean.fd.DmCzjbb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 船只基本表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
public interface DmCzjbbService extends IService<DmCzjbb> {
|
||||||
|
|
||||||
|
}
|
@ -1,10 +1,16 @@
|
|||||||
package com.dsic.gj_erp.service.fd;
|
package com.dsic.gj_erp.service.fd;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.dsic.gj_erp.bean.fd.DmXqdwcjcd;
|
import com.dsic.gj_erp.bean.fd.DmXqdwcjcd;
|
||||||
import com.dsic.gj_erp.mapper.fd.DmXqdwcjcdMapper;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
/**
|
||||||
public class DmXqdwcjcdService extends ServiceImpl<DmXqdwcjcdMapper, DmXqdwcjcd> {
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-06-16
|
||||||
|
*/
|
||||||
|
public interface DmXqdwcjcdService extends IService<DmXqdwcjcd> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,282 @@
|
|||||||
|
package com.dsic.gj_erp.service.fd.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dsic.gj_erp.bean.fd.*;
|
||||||
|
import com.dsic.gj_erp.bean.sy.SyDzbmp;
|
||||||
|
import com.dsic.gj_erp.mapper.fd.DmCzfddybMapper;
|
||||||
|
import com.dsic.gj_erp.service.fd.DmCzfddybService;
|
||||||
|
import com.dsic.gj_erp.service.fd.DmCzjbbService;
|
||||||
|
import com.dsic.gj_erp.service.fd.DmXqdwcjcdService;
|
||||||
|
import com.dsic.gj_erp.service.sy.impl.SyDzbmpService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.beans.PropertyDescriptor;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DmCzfddybServiceImpl extends ServiceImpl<DmCzfddybMapper, DmCzfddyb> implements DmCzfddybService {
|
||||||
|
@Autowired
|
||||||
|
DmCzjbbService czjbbService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
SyDzbmpService syDzbmpService;
|
||||||
|
// @Autowired
|
||||||
|
// DmZhbmpService dmZhbmpService;
|
||||||
|
// @Autowired
|
||||||
|
/// MpZzdwjbbService mpZzdwjbbService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// MpZzdwjbbMapper mpZzdwjbbMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TpImpl tpImpl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
DmXqdwcjcdService dmXqdwcjcdService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Map uploadFd(HttpServletRequest httpRequest, List<ExcelExport> excelList, String czbh, String isupload) throws Exception {
|
||||||
|
Map rMap = new HashMap();
|
||||||
|
czbh=czbh+"#";
|
||||||
|
if ("01".equals(isupload)) {
|
||||||
|
// 查询是否 有值
|
||||||
|
List<DmCzfddyb> czbh1 = this.list(new QueryWrapper<DmCzfddyb>().eq("czbh", czbh));
|
||||||
|
if (czbh1.size() > 0) {
|
||||||
|
rMap.put("zt", "01");
|
||||||
|
return rMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.remove(new QueryWrapper<DmCzfddyb>().eq("CZBH", czbh));
|
||||||
|
List<DmCzfddyb> addList = new ArrayList<>();
|
||||||
|
int row = 0;
|
||||||
|
for (int i = 0; i < excelList.size(); i++) {
|
||||||
|
ExcelExport e = excelList.get(i);
|
||||||
|
Class cls = e.getClass();
|
||||||
|
Field[] fields = cls.getDeclaredFields();
|
||||||
|
for (int j = 0; j < fields.length; j++) {
|
||||||
|
String fdh = "";
|
||||||
|
int col;
|
||||||
|
Field f = fields[j];
|
||||||
|
f.setAccessible(true);
|
||||||
|
try {
|
||||||
|
fdh = (String) f.get(e);
|
||||||
|
} catch (IllegalAccessException ex) {
|
||||||
|
throw new RuntimeException(ex);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(fdh)) {
|
||||||
|
DmCzfddyb czfddyb = new DmCzfddyb();
|
||||||
|
czfddyb.setCzbh(czbh);
|
||||||
|
czfddyb.setFdh(fdh);
|
||||||
|
czfddyb.setFrow(i);
|
||||||
|
String colName = f.getName();
|
||||||
|
col = Integer.parseInt(colName.substring(colName.length() - 3));
|
||||||
|
czfddyb.setFcol(col);
|
||||||
|
addList.add(czfddyb);
|
||||||
|
}
|
||||||
|
//System.out.println("属性名:" + f.getName() + " 属性值:" + );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.saveBatch(addList);
|
||||||
|
return rMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map getCzFdBase( HttpServletRequest req,Map map) {
|
||||||
|
Map rMap = new HashMap();
|
||||||
|
String bmbm = (String)req.getAttribute("bmbm");
|
||||||
|
List<DmCzjbb> czbhs;
|
||||||
|
if(StringUtils.isNotBlank(bmbm)&& bmbm.length()>2){
|
||||||
|
|
||||||
|
czbhs = czjbbService.list(new QueryWrapper<DmCzjbb>()
|
||||||
|
.select("replace(czbh,'#','') AS czbh")
|
||||||
|
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "")
|
||||||
|
.ne("isnull(wgbs,'N')","Y").eq(" isnull(cims_bs,'')","Y").
|
||||||
|
eq("left(gcqy,1)","0").
|
||||||
|
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
||||||
|
));
|
||||||
|
}else{
|
||||||
|
czbhs = czjbbService.list(new QueryWrapper<DmCzjbb>()
|
||||||
|
.select("replace(czbh,'#','') AS czbh")
|
||||||
|
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "").
|
||||||
|
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只显示海工名船 简称不等于空
|
||||||
|
rMap.put("czbhs", czbhs);
|
||||||
|
|
||||||
|
|
||||||
|
return rMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map getList(Map map) throws Exception {
|
||||||
|
Map returnMap = new HashMap();
|
||||||
|
List<ExcelExport> returnList = new ArrayList<>();
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
|
queryWrapper.eq("CZBH", map.get("czbh")+"#");
|
||||||
|
List<DmCzfddyb> list = this.list(queryWrapper);
|
||||||
|
queryWrapper.select("max(frow) as frow ", "max(fcol)as fcol");
|
||||||
|
DmCzfddyb one = this.getOne(queryWrapper);
|
||||||
|
if (one != null) {
|
||||||
|
int row = one.getFrow();
|
||||||
|
int col = one.getFcol();
|
||||||
|
for (int i = 0; i <= row; i++) {
|
||||||
|
ExcelExport excelExport = new ExcelExport();
|
||||||
|
int tempi = i;
|
||||||
|
List<DmCzfddyb> collect = list.stream().filter(fst -> fst.getFrow() == tempi).collect(Collectors.toList());
|
||||||
|
for (int y = 0; y <= col; y++) {
|
||||||
|
int tempy = y;
|
||||||
|
DmCzfddyb czfddyb = collect.stream().filter(fst -> fst.getFcol() == tempy).findFirst().orElse(null);
|
||||||
|
if (null != czfddyb) {
|
||||||
|
PropertyDescriptor propertyDescriptor = new PropertyDescriptor("column" + String.format("%03d", czfddyb.getFcol()), excelExport.getClass());
|
||||||
|
Method setMethod = propertyDescriptor.getWriteMethod();
|
||||||
|
// 调用指定对象set方法
|
||||||
|
setMethod.invoke(excelExport, czfddyb.getFdh());
|
||||||
|
// System.out.println(object.getName());// 输出Jack Chen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
returnList.add(excelExport);
|
||||||
|
}
|
||||||
|
returnMap.put("data", returnList);
|
||||||
|
returnMap.put("col", col);
|
||||||
|
}
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map getTpBase( HttpServletRequest req,Map map) throws Exception {
|
||||||
|
Map rMap = new HashMap();
|
||||||
|
String bmbm = (String)req.getAttribute("bmbm");
|
||||||
|
List<DmCzjbb> czbhs;
|
||||||
|
List<DmXqdwcjcd>cdmcs;
|
||||||
|
List<DmXqdwcjcd>cjmcs;
|
||||||
|
if(StringUtils.isNotBlank(bmbm)&& bmbm.length()>2){
|
||||||
|
|
||||||
|
czbhs = czjbbService.list(new QueryWrapper<DmCzjbb>()
|
||||||
|
.select("replace(czbh,'#','') AS czbh")
|
||||||
|
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "")
|
||||||
|
.ne("isnull(wgbs,'N')","Y").eq(" isnull(cims_bs,'')","Y").
|
||||||
|
eq("left(gcqy,1)","0").
|
||||||
|
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
||||||
|
));
|
||||||
|
cdmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().eq("dwbm","P30000").orderBy(true,true,"cdmc"));
|
||||||
|
cjmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().select("DISTINCT cjmc as cjmc").eq("dwbm","P30000").orderBy(true,true,"cjmc"));
|
||||||
|
}else{
|
||||||
|
czbhs = czjbbService.list(new QueryWrapper<DmCzjbb>()
|
||||||
|
.select("replace(czbh,'#','') AS czbh")
|
||||||
|
.in("yzbs", "N", "H").ne("isnull(czjc,'')", "").
|
||||||
|
orderBy(true, true, "wgbs", "left(czbh,charindex('-',czbh)-1)", "len(czbh)", "czbh"
|
||||||
|
));
|
||||||
|
cdmcs=dmXqdwcjcdService.list();
|
||||||
|
cjmcs=dmXqdwcjcdService.list(new QueryWrapper<DmXqdwcjcd>().select("DISTINCT cjmc as cjmc"));
|
||||||
|
}
|
||||||
|
|
||||||
|
//作业阶段
|
||||||
|
List<SyDzbmp> zyjds = syDzbmpService.list(new QueryWrapper<SyDzbmp>().eq("bml", "ZYJD"));
|
||||||
|
//部件类别
|
||||||
|
// List<DmZhbmp> bjlbs = dmZhbmpService.list(new QueryWrapper<DmZhbmp>().eq("bmlb", "TPLX"));
|
||||||
|
// List<Map> xqdws = mpZzdwjbbMapper.findxqdwAll();
|
||||||
|
// List<DmZhbmp> bmbms = dmZhbmpService.list(new QueryWrapper<DmZhbmp>().eq("bmlb", "bmbm").in("bm","01","02","03","04"));
|
||||||
|
rMap.put("czbhs", czbhs);
|
||||||
|
rMap.put("zyjds", zyjds);
|
||||||
|
// rMap.put("bjlbs", bjlbs);
|
||||||
|
// rMap.put("xqdws", xqdws);
|
||||||
|
// rMap.put("bmbms", bmbms);
|
||||||
|
rMap.put("cdmcs", cdmcs);
|
||||||
|
rMap.put("cjmcs", cjmcs);
|
||||||
|
return rMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map getListFdMx(Map map) throws Exception {
|
||||||
|
// Map returnMap = new HashMap();
|
||||||
|
Map returnMap = this.getList(map);
|
||||||
|
|
||||||
|
List<TppsQk> tppsQks = tpImpl.findTppsQk(map);
|
||||||
|
// List<DmZhbmp> bjlbs = dmZhbmpService.list(new QueryWrapper<DmZhbmp>().eq("bmlb", "TPLX"));
|
||||||
|
|
||||||
|
Map<String, List<TppsQk>> collect = tppsQks.stream().collect(
|
||||||
|
Collectors.groupingBy(
|
||||||
|
score -> score.getFdh()+'-'+score.getTplx()
|
||||||
|
));
|
||||||
|
List<FdBean> fdBeans=new ArrayList<>();
|
||||||
|
for(Map.Entry<String, List<TppsQk>> entry : collect.entrySet()){
|
||||||
|
FdBean fdBean=new FdBean();
|
||||||
|
String mapKey = entry.getKey();
|
||||||
|
String color="";
|
||||||
|
String[] parts = mapKey.split("-");
|
||||||
|
String fdh=parts[0];
|
||||||
|
String tplx=parts[1];
|
||||||
|
// if(a.compareTo(b) < 1){
|
||||||
|
// System.out.println("a小于等于b");
|
||||||
|
// }
|
||||||
|
|
||||||
|
BigDecimal xqslSum=entry.getValue().stream().map(s-> s.getXqsl()).reduce(BigDecimal.ZERO,BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
BigDecimal psslSum=entry.getValue().stream().map(s-> s.getPssl()).reduce(BigDecimal.ZERO,BigDecimal::add).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
|
List<TppsQk> rqList=entry.getValue();
|
||||||
|
boolean flag=false;
|
||||||
|
// if(fdh.equals("ZL04")){
|
||||||
|
// rqList.get(0).setQfxqrq("2022/04/13");
|
||||||
|
// }
|
||||||
|
for(TppsQk q :rqList){
|
||||||
|
if(StringUtils.isNotBlank(q.getQfxqrq())){
|
||||||
|
flag=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(xqslSum.compareTo(BigDecimal.ZERO)==0 ){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
BigDecimal result =psslSum.divide(xqslSum,2,BigDecimal.ROUND_HALF_UP);
|
||||||
|
System.out.println("result = " + result +"xqsl"+xqslSum +"pssl"+psslSum+"fhd"+fdh);
|
||||||
|
|
||||||
|
if(result.compareTo(new BigDecimal("0.9"))> -1 ){ // result > =0.9
|
||||||
|
if("0201".equals(tplx)){
|
||||||
|
color="green";
|
||||||
|
}
|
||||||
|
}else if (result.compareTo(new BigDecimal("0.5"))>-1 && result.compareTo(new BigDecimal("0.9"))<1 ) {
|
||||||
|
if("0201".equals(tplx)){
|
||||||
|
color="yellow";
|
||||||
|
}
|
||||||
|
}else if( result.compareTo(new BigDecimal("0.5"))<1 && flag ){
|
||||||
|
if("0201".equals(tplx)){
|
||||||
|
color="red";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("result = " + result +"xqsl"+xqslSum +"pssl"+psslSum+"fhd"+fdh+"COLOR"+color);
|
||||||
|
}
|
||||||
|
fdBean.setFdh(fdh);
|
||||||
|
|
||||||
|
fdBean.setTplx(tplx);
|
||||||
|
|
||||||
|
fdBean.setColor(color);
|
||||||
|
|
||||||
|
fdBeans.add(fdBean);
|
||||||
|
}
|
||||||
|
returnMap.put("fd", fdBeans);
|
||||||
|
returnMap.put("fdqk", tppsQks);
|
||||||
|
return returnMap;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.dsic.gj_erp.service.fd.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dsic.gj_erp.bean.fd.DmCzjbb;
|
||||||
|
import com.dsic.gj_erp.mapper.fd.DmCzjbbMapper;
|
||||||
|
import com.dsic.gj_erp.service.fd.DmCzjbbService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 船只基本表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-05-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DmCzjbbServiceImpl extends ServiceImpl<DmCzjbbMapper, DmCzjbb> implements DmCzjbbService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.dsic.gj_erp.service.fd.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.dsic.gj_erp.bean.fd.DmXqdwcjcd;
|
||||||
|
import com.dsic.gj_erp.mapper.fd.DmXqdwcjcdMapper;
|
||||||
|
import com.dsic.gj_erp.service.fd.DmXqdwcjcdService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xhj
|
||||||
|
* @since 2023-06-16
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DmXqdwcjcdServiceImpl extends ServiceImpl<DmXqdwcjcdMapper, DmXqdwcjcd> implements DmXqdwcjcdService {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue