diff --git a/pom.xml b/pom.xml index 27f0bcad81ee75f797d05e59143b1bdb7bd7d753..d4604055e58ff48ce2c54cfaf9bbfbc583fd063e 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,16 @@ spring-boot-starter-test test + + tk.mybatis + mapper-spring-boot-starter + 2.0.4 + + + tk.mybatis + mapper-generator + 1.1.5 + diff --git a/src/main/java/com/authine/cloudpivot/WebApiBootStartupApplication.java b/src/main/java/com/authine/cloudpivot/WebApiBootStartupApplication.java index d480742b0b08180a02339acffe3acb8c8faf2a3a..2ff50d5b7b2acfc45601a2a77637df13f6a40876 100644 --- a/src/main/java/com/authine/cloudpivot/WebApiBootStartupApplication.java +++ b/src/main/java/com/authine/cloudpivot/WebApiBootStartupApplication.java @@ -1,6 +1,7 @@ package com.authine.cloudpivot; import lombok.extern.slf4j.Slf4j; +import org.mapstruct.Mapper; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; @@ -9,11 +10,15 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.Environment; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; import springfox.documentation.swagger2.annotations.EnableSwagger2; +import tk.mybatis.spring.annotation.MapperScan; import java.net.InetAddress; import java.net.UnknownHostException; -@SpringBootApplication +@SpringBootApplication( + scanBasePackages = {"com.authine.cloudpivot.web.api", "com.authine.cloudpivot.sso", "com.authine.cloudpivot"} +) +@MapperScan(basePackages = "com.authine.cloudpivot.web.api.stage.mapper") @EnableSwagger2 @Slf4j @EnableRedisHttpSession(redisNamespace = "${spring.session.redis.namespace}") diff --git a/src/main/java/com/authine/cloudpivot/web/api/stage/controller/StageController.java b/src/main/java/com/authine/cloudpivot/web/api/stage/controller/StageController.java new file mode 100644 index 0000000000000000000000000000000000000000..f62fb0a920d0b1e7f680dfbb479bd58c627eeafc --- /dev/null +++ b/src/main/java/com/authine/cloudpivot/web/api/stage/controller/StageController.java @@ -0,0 +1,35 @@ +package com.authine.cloudpivot.web.api.stage.controller; + +import com.authine.cloudpivot.web.api.controller.base.BaseController; +import com.authine.cloudpivot.web.api.dubbo.DubboConfigService; +import com.authine.cloudpivot.web.api.stage.service.StageService; +import com.authine.cloudpivot.web.api.util.BaseJSON; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RequestMapping("/api/contact") +@RestController +@Component +public class StageController extends BaseController { + + + @Autowired + DubboConfigService dubboConfigService; + + @Autowired + private StageService skipService; + + @GetMapping("/getIndexNewsList") + public Boolean getSkipDataList(@RequestParam String beforeObjectId,@RequestParam String identification){ + // String marktostage =dubboConfigService.getBizObjectFacade().getTableName("marktostage"); + return skipService.getSkipDataList(beforeObjectId,identification); + } + + +} diff --git a/src/main/java/com/authine/cloudpivot/web/api/stage/mapper/StageMapper.java b/src/main/java/com/authine/cloudpivot/web/api/stage/mapper/StageMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..2e3e3ef1cd6c59f7a19e050eeaa26db9ab528a8c --- /dev/null +++ b/src/main/java/com/authine/cloudpivot/web/api/stage/mapper/StageMapper.java @@ -0,0 +1,51 @@ +package com.authine.cloudpivot.web.api.stage.mapper; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +@Mapper +public interface StageMapper { + + + @Select("SELECT i.id from biz_workflow_instance i \n" + + "left join \n" + + "i34ir_qqxxregister q on \n" + + "i.bizObjectId=q.id where q.beforeObjectId=#{beforeObjectId} and i.state in('COMPLETED','PROCESSING')\n") + List getSkipDataList( + @Param("beforeObjectId") String beforeObjectId + ); + + @Select("SELECT i.id from biz_workflow_instance i \n" + + "left join \n" + + "i34ir_marktostage q on \n" + + "i.bizObjectId=q.id where q.beforeObjectId=#{beforeObjectId} and i.state in('COMPLETED','PROCESSING')\n") + List getSkipDataList2( + @Param("beforeObjectId") String beforeObjectId + ); + + @Select("SELECT i.id from biz_workflow_instance i \n" + + "left join \n" + + "i34ir_qqztbxx q on \n" + + "i.bizObjectId=q.id where q.beforeObjectId=#{beforeObjectId} and i.state in('COMPLETED','PROCESSING')\n") + List getSkipDataList3( + @Param("beforeObjectId") String beforeObjectId + ); + @Select("SELECT i.id from biz_workflow_instance i \n" + + "left join \n" + + "i34ir_bjspsqlc q on \n" + + "i.bizObjectId=q.id where q.beforeObjectId=#{beforeObjectId} and i.state in('COMPLETED','PROCESSING')\n") + List getSkipDataList4( + @Param("beforeObjectId") String beforeObjectId + ); + + @Select("SELECT i.id from biz_workflow_instance i \n" + + "left join \n" + + "i34ir_qqpactapply q on \n" + + "i.bizObjectId=q.id where q.beforeObjectId=#{beforeObjectId} and i.state in('COMPLETED','PROCESSING')\n") + List getSkipDataList5( + @Param("beforeObjectId") String beforeObjectId + ); +} diff --git a/src/main/java/com/authine/cloudpivot/web/api/stage/service/StageService.java b/src/main/java/com/authine/cloudpivot/web/api/stage/service/StageService.java new file mode 100644 index 0000000000000000000000000000000000000000..bd8fbdf200c294199f234a2ee1c53bfc6208887c --- /dev/null +++ b/src/main/java/com/authine/cloudpivot/web/api/stage/service/StageService.java @@ -0,0 +1,7 @@ +package com.authine.cloudpivot.web.api.stage.service; + +public interface StageService { + + Boolean getSkipDataList(String beforeObjectId,String identification); + +} diff --git a/src/main/java/com/authine/cloudpivot/web/api/stage/service/impl/StageServiceImpl.java b/src/main/java/com/authine/cloudpivot/web/api/stage/service/impl/StageServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..3f99cc25cd63f7e4238bf37cf9a50ff67acc3c78 --- /dev/null +++ b/src/main/java/com/authine/cloudpivot/web/api/stage/service/impl/StageServiceImpl.java @@ -0,0 +1,72 @@ +package com.authine.cloudpivot.web.api.stage.service.impl; + + +import com.authine.cloudpivot.web.api.stage.mapper.StageMapper; +import com.authine.cloudpivot.web.api.stage.service.StageService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Slf4j +@Service +public class StageServiceImpl implements StageService { + + + @Autowired + StageMapper stageMapper; + @Override + public Boolean getSkipDataList(String beforeObjectId,String identification) { + + Boolean hasList=true; + /** + * 前期信息登记 + */ + if(identification.equals("0")) { + List skipDataList = stageMapper.getSkipDataList(beforeObjectId); + if (skipDataList.size() > 0) { + hasList = false; + } + } + /** + * 营销转前期 + */ + if(identification.equals("1")) { + List skipDataList2 = stageMapper.getSkipDataList2(beforeObjectId); + if (skipDataList2.size() > 0) { + hasList = false; + } + } + /** + * 前期转投标 + */ + if(identification.equals("2")) { + List skipDataList3 = stageMapper.getSkipDataList3(beforeObjectId); + if (skipDataList3.size() > 0) { + hasList = false; + } + } + /** + * 报价审批 + */ + if(identification.equals("3")) { + List skipDataList4 = stageMapper.getSkipDataList4(beforeObjectId); + if (skipDataList4.size() > 0) { + hasList = false; + } + } + + /** + * 转合同申请 + */ + if(identification.equals("4")) { + List skipDataList5 = stageMapper.getSkipDataList5(beforeObjectId); + if (skipDataList5.size() > 0) { + hasList = false; + } + } + return hasList; + } + +} diff --git a/src/main/java/com/authine/cloudpivot/web/api/stage/vo/ContactVo.java b/src/main/java/com/authine/cloudpivot/web/api/stage/vo/ContactVo.java new file mode 100644 index 0000000000000000000000000000000000000000..23ebfb73fac2b8fe9ddf980869a246bf816408e2 --- /dev/null +++ b/src/main/java/com/authine/cloudpivot/web/api/stage/vo/ContactVo.java @@ -0,0 +1,278 @@ +package com.authine.cloudpivot.web.api.stage.vo; + + +import lombok.Getter; +import lombok.Setter; + +import java.util.Date; + +@Getter +@Setter +public class ContactVo { + private String id; + /** + * 数据标题 + */ + private String name; + /** + * 创建人 + */ + private String creater; + /** + * 创建人部门 + */ + private String createdDeptid; + /** + * 拥有者 + */ + private String owner; + /** + * 拥有者部门 + */ + private String ownerDeptid; + /** + * 创建时间 + */ + private Date createdTime; + /** + * 修改人 + */ + private String modifier; + /** + * 修改时间 + */ + private Date modifiedTime; + /** + * 流程实例ID + */ + private String workflowInstanceId; + /** + * 单据号 + */ + private String sequenceNo; + /** + * 单据状态 + */ + private String sequenceStatus; + /** + * 部门查询编码 + */ + private String ownerDeptQueryCode; + /** + * 合同编号 + */ + private String htCode; + /** + * 合同签订状态 + */ + private String htqdType; + /** + * 项目名称 + */ + private String proName; + /** + * 合同覆行状态 + */ + private String htfxType; + /** + * 签订日期 + */ + private Date qdDate; + /** + * 签约合同金额(万元) + */ + private Double qyhtjeY; + /** + * 现合同金额(万元) + */ + private Double htjeNow; + /** + * 已收入确认金额(万元 + */ + private Double incomeJe; + /** + * 已开发票金额(万元) + */ + private Double invoiceJe; + /** + * 已收款金额(万元) + */ + private Double collecJe; + /** + * 建设单位 + */ + private String jsdw; + /** + * 合同乙方 + */ + private String contractYf; + /** + * 项目客户联系人 + */ + private String linkman; + /** + * 手机号码 + */ + private Double phoneNumber; + /** + * 合同相关方 + */ + private String htxgf; + /** + * 经营责任主体一级部门 + */ + private Object yjDep; + /** + * 经营责任主体二级部门 + */ + private Object secondDep; + /** + * 实施负责主体部门 + */ + private Object ssDep; + /** + * 实施负责主体二级部门 + */ + private Object ssSecondDep; + /** + * 地址 + */ + private Object address; + /** + * 项目性质 + */ + private String xmxz; + /** + * 项目类型 + */ + private String xmType; + /** + * 是否集团统筹经营项目 + */ + private String jttcPro; + /** + * 是否集团重点关注项目 + */ + private String importXm; + /** + * 是否招投标项目 + */ + private String zbxm; + /** + * 是否虚拟合同 + */ + private String xnht; + /** + * 合同登记日期 + */ + private Date tjdjDateTime; + /** + * 已盖章送出日期 + */ + private Date scDate; + /** + * 签订确认日期 + */ + private Date qrDateTime; + /** + * 备注 + */ + private Object bzcontent; + /** + * 规模和特征 + */ + private String addGmOrTz; + /** + * 总投资或投资估算 + */ + private String ztzOrgs; + /** + * 工程费用 + */ + private String gcfy; + /** + * 备注 + */ + private Object tdContent; + /** + * 总建筑面积 + */ + private String zjzmj; + /** + * 其中地上建筑面积 + */ + private String dsjzmj; + /** + * 其中地下建筑面积 + */ + private String dxArea; + /** + * 用地面积 + */ + private String siteArea; + /** + * 常级 + */ + private String chJi; + /** + * 核级 + */ + private String heJi; + /** + * 地上层数 + */ + private String dsplies; + /** + * 地下室层数 + */ + private String dxplies; + /** + * 建筑高度 + */ + private String jzHeight; + /** + * 计费方式 + */ + private String billingFs; + /** + * 折扣率 + */ + private String discount; + /** + * 合计总价 + */ + private String zNum ; + /** + * 是否需要覆约担保 + */ + private String fydb; + /** + * 覆约担保比例(%) + */ + private String fydbxs; + /** + * 覆约担保形式 + */ + private String dbxsfy; + /** + * 担保起始日期 + */ + private Date dbstartTime; + /** + * 担保结束日期 + */ + private Date dbendTime; + /** + * 担保提供日期 + */ + private Date tgTime; + /** + * 担保回收日期 + */ + private Date hsDate; + /** + * 担保回收金额(万元) + */ + private Double dbhsje; + +}