Merge remote-tracking branch 'origin/develop_master' into develop_1
# Conflicts: # adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsDetailedList/service/impl/SarLawsDetailedListServiceImpl.java # adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandUnqualified/dao/SarStandUnqualifiedDao.java # adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandUnqualified/service/impl/SarStandUnqualifiedServiceImpl.java # adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsAttrDetailedList/SarLawsAttrDetailedListMapper.xml
This commit is contained in:
+58
@@ -0,0 +1,58 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "福田标准法规--企业标准关联国内外标准信息")
|
||||
@RequestMapping("/${restPath}/lawss/SarBussStandAttrInfo")
|
||||
public class SarBussStandAttrInfoController extends BaseController<SarBussStandAttrInfo> {
|
||||
|
||||
@Autowired
|
||||
private ISarBussStandAttrInfoService sarBussStandAttrInfoEOService;
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:page")
|
||||
public ResponseMessage<PageInfo<SarBussStandAttrInfo>> page(SarBussStandAttrInfoEOPage page) throws Exception {
|
||||
List<SarBussStandAttrInfo> rows = sarBussStandAttrInfoEOService.queryByPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|查询")
|
||||
@GetMapping("")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:list")
|
||||
public ResponseMessage<List<SarBussStandAttrInfo>> list(SarBussStandAttrInfoEOPage page) throws Exception {
|
||||
return Result.success(sarBussStandAttrInfoEOService.queryByList(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|SarBussStandAttrInfoEO|新增")
|
||||
@PostMapping(consumes = "application/json;charset=UTF-8")
|
||||
// @RequiresPermissions("lawss:sarBussStandAttrInfo:save")
|
||||
public ResponseMessage<SarBussStandAttrInfo> create(@RequestBody SarBussStandAttrInfo sarBussStandAttrInfoEO) throws Exception {
|
||||
sarBussStandAttrInfoEOService.insertSelective(sarBussStandAttrInfoEO);
|
||||
return Result.success(sarBussStandAttrInfoEO);
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Repository
|
||||
public interface SarBussStandAttrInfoDao extends BaseMapper<SarBussStandAttrInfo> {
|
||||
|
||||
List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo);
|
||||
|
||||
Map<String, Object> selectStandFieldAndData(@Param("fieldInfo") String fieldInfo, @Param("standId") String standId);
|
||||
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarBussStandAttrInfo对象", description="")
|
||||
public class SarBussStandAttrInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableField("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准基础表主键")
|
||||
@TableField("STAND_ID")
|
||||
private String standId;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
//
|
||||
// @TableField("SVPPS")
|
||||
// private String svpps;
|
||||
//
|
||||
// @TableField("GFXYYWJ")
|
||||
// private String gfxyywj;
|
||||
//
|
||||
// @TableField("ZRBM")
|
||||
// private String zrbm;
|
||||
//
|
||||
// @TableField("FZRQ")
|
||||
// private Date fzrq;
|
||||
//
|
||||
// @TableField("FSRQ")
|
||||
// private Date fsrq;
|
||||
//
|
||||
// @TableField("QBMJ")
|
||||
// private String qbmj;
|
||||
//
|
||||
// @TableField("QBSQ")
|
||||
// private String qbsq;
|
||||
//
|
||||
// @TableField("QBWB")
|
||||
// private String qbwb;
|
||||
//
|
||||
// @TableField("GCWB")
|
||||
// private String gcwb;
|
||||
//
|
||||
// @TableField("ZYQCR")
|
||||
// private String zyqcr;
|
||||
//
|
||||
// @TableField("QCFBW")
|
||||
// private String qcfbw;
|
||||
//
|
||||
// @TableField("XGLC")
|
||||
// private String xglc;
|
||||
//
|
||||
// @TableField("XGBM")
|
||||
// private String xgbm;
|
||||
//
|
||||
// @TableField("XHQBM")
|
||||
// private String xhqbm;
|
||||
//
|
||||
// @TableField("ZQCBM")
|
||||
// private String zqcbm;
|
||||
//
|
||||
// @TableField("QTQCR")
|
||||
// private String qtqcr;
|
||||
//
|
||||
// @TableField("WFSPJS")
|
||||
// private String wfspjs;
|
||||
//
|
||||
// @TableField("XGJH")
|
||||
// private String xgjh;
|
||||
|
||||
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.entity;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>SAR_BUSS_STAND_ATTR_INFO SarBussStandAttrInfoEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-10-27 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class SarBussStandAttrInfoEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String standId;
|
||||
private String standIdOperator = "=";
|
||||
private String creationUser;
|
||||
private String creationUserOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getStandId() {
|
||||
return this.standId;
|
||||
}
|
||||
|
||||
public void setStandId(String standId) {
|
||||
this.standId = standId;
|
||||
}
|
||||
|
||||
public String getStandIdOperator() {
|
||||
return this.standIdOperator;
|
||||
}
|
||||
|
||||
public void setStandIdOperator(String standIdOperator) {
|
||||
this.standIdOperator = standIdOperator;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return this.creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
|
||||
public String getCreationUserOperator() {
|
||||
return this.creationUserOperator;
|
||||
}
|
||||
|
||||
public void setCreationUserOperator(String creationUserOperator) {
|
||||
this.creationUserOperator = creationUserOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
public interface ISarBussStandAttrInfoService extends IService<SarBussStandAttrInfo> {
|
||||
|
||||
List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page);
|
||||
|
||||
int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo);
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.adc.da.slrs.sarBussStandAttrInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfoEOPage;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.service.ISarBussStandAttrInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-07-20
|
||||
*/
|
||||
@Service
|
||||
public class SarBussStandAttrInfoServiceImpl extends ServiceImpl<SarBussStandAttrInfoDao, SarBussStandAttrInfo> implements ISarBussStandAttrInfoService {
|
||||
|
||||
@Override
|
||||
public List<SarBussStandAttrInfo> queryByList(SarBussStandAttrInfoEOPage page){
|
||||
return this.baseMapper.queryByList(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarBussStandAttrInfo> queryByPage(SarBussStandAttrInfoEOPage page){
|
||||
return this.baseMapper.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(SarBussStandAttrInfo sarBussStandAttrInfo){
|
||||
return this.baseMapper.insertSelective(sarBussStandAttrInfo);
|
||||
}
|
||||
}
|
||||
+60
@@ -1,12 +1,28 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.controller;
|
||||
|
||||
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarAdvanceSearchVO;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.utils.util.SarAdvanceSearchUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业标准信息表 前端控制器
|
||||
@@ -20,4 +36,48 @@ import com.adc.da.base.web.BaseController;
|
||||
@RequestMapping("/${restPath}/lawss/sarBussionessStand")
|
||||
public class SarBussionessStandController extends BaseController<SarBussionessStand> {
|
||||
|
||||
@Autowired
|
||||
private ISarBussionessStandService sarBussionessStandEOService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
/**
|
||||
* 自定义分页查询列表
|
||||
* @param page 标准信息
|
||||
* @return
|
||||
* @author gaoyan
|
||||
* date 2018-09-04
|
||||
*/
|
||||
@ApiOperation(value = "|SarBussionessStandEO|自定义分页查询列表")
|
||||
@GetMapping("/getSarBussionStandPage")
|
||||
//@RequiresPermissions("lawss:sarBussionessStand:getSarBussionStandPage")
|
||||
public ResponseMessage<PageInfo<SarBussionessStand>> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception {
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
String advanceStr = SarAdvanceSearchUtil.createSql(searchList);
|
||||
if (StringUtils.isNotBlank(advanceStr)) {
|
||||
page.setAdvanceSearchStr(advanceStr);
|
||||
} else {
|
||||
page.setAdvanceSearchStr(null);
|
||||
}
|
||||
}
|
||||
page.setUserId(LoginUserUtil.getUserId());
|
||||
if(StringUtils.isNotBlank(page.getPaixu())){
|
||||
String sql = page.getPaixu()+" "+page.getShunxu();
|
||||
page.setSql(sql);
|
||||
}else{
|
||||
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
|
||||
}
|
||||
List<String> getMenuIdList = iTsResourceService.queryRoleMenuIdList("BUSINESS_STAND",page.getMenuId());
|
||||
if(getMenuIdList != null && !getMenuIdList.isEmpty()){
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
List<SarBussionessStand> rows = sarBussionessStandEOService.getSarBussionStandPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
} else {
|
||||
return Result.success(getPageInfo(page.getPager(), null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -3,6 +3,7 @@ package com.adc.da.slrs.sarBussionessStand.dao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +15,13 @@ import java.util.List;
|
||||
* @author super_liu
|
||||
* @since 2021-07-13
|
||||
*/
|
||||
@Repository
|
||||
public interface SarBussionessStandDao extends BaseMapper<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
|
||||
int getBussionessStandInfoCount(SarBussionessStandEOPage page);
|
||||
|
||||
List<SarBussionessStand> getBussionessStandInfoPage(SarBussionessStandEOPage page);
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -17,4 +17,6 @@ import java.util.List;
|
||||
public interface ISarBussionessStandService extends IService<SarBussionessStand> {
|
||||
|
||||
List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage);
|
||||
|
||||
List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception;
|
||||
}
|
||||
|
||||
+119
@@ -1,13 +1,28 @@
|
||||
package com.adc.da.slrs.sarBussionessStand.service.impl;
|
||||
|
||||
import com.adc.da.common.SelectionTypeEnum;
|
||||
import com.adc.da.person.service.IPersonCollectEOService;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.dao.SarBussionessStandDao;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarResource.entity.TsResource;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Clob;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -20,6 +35,110 @@ import java.util.List;
|
||||
@Service
|
||||
public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStandDao, SarBussionessStand> implements ISarBussionessStandService {
|
||||
|
||||
@Autowired
|
||||
private ITsUserService tsUserService;
|
||||
|
||||
@Autowired
|
||||
private ITsResourceService iTsResourceService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysInfoEOService sysInfoEOService;
|
||||
|
||||
@Autowired
|
||||
private IPersonCollectEOService personCollectEOService;
|
||||
|
||||
@Autowired
|
||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception {
|
||||
if (StringUtils.isNotBlank(page.getMenuId())) {
|
||||
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
|
||||
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
Integer rowCount = this.baseMapper.getBussionessStandInfoCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarBussionessStand> sarlist = this.baseMapper.getBussionessStandInfoPage(page);
|
||||
attrInfo(sarlist);
|
||||
return sarlist;
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 处理属性表数据
|
||||
* @Param: [sarlist]
|
||||
* @Return: void
|
||||
*/
|
||||
public void attrInfo (List<SarBussionessStand> sarlist) throws Exception {
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetails(row);
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoDetails (SarBussionessStand row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryFieldBuss;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarBussStandAttrInfoEODao.selectStandFieldAndData(fieldInfo,row.getId());
|
||||
if (InitStandAttrUtil.clobFieldListBuss != null && !InitStandAttrUtil.clobFieldListBuss.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldListBuss) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField,fieldValue);
|
||||
}
|
||||
}
|
||||
// 组织机构和人员
|
||||
Map<String,Object> newMap = new HashMap<>();
|
||||
if(getAttrMap != null){
|
||||
for (Map.Entry<String,Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
Object value1 = entry.getValue();
|
||||
if (value1 != null && value1.toString().equals("\"null\"")){
|
||||
entry.setValue("");
|
||||
}
|
||||
if ("SVPPS".equals(name)) {
|
||||
Object value = entry.getValue();
|
||||
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
||||
value = sysInfoEOService.getSvppsNamesByIds(value.toString());
|
||||
}
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
String value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getOrgNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.USERLIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getUserNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
} else if (SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
value = sysInfoEOService.getRoleNamesByIds(value);
|
||||
newMap.put(name + "Name",value);
|
||||
}
|
||||
}
|
||||
}
|
||||
getAttrMap.putAll(newMap);
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<SarBussionessStand> queryByList(SarBussionessStandEOPage sarBussionessStandEOPage){
|
||||
return this.baseMapper.queryByList(sarBussionessStandEOPage);
|
||||
|
||||
+16
-3
@@ -50,10 +50,10 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
||||
* 查询所有机构和人员
|
||||
* @return ResponseMessage<List<TsInstitution>>
|
||||
*/
|
||||
@ApiOperation("查询所有机构和人员")
|
||||
@ApiOperation("查询所有机构和人员或根据名称查询")
|
||||
@GetMapping("/institutionAndUser")
|
||||
public ResponseMessage<List<TsInstitution>> getInstitutionAndUser(){
|
||||
List<TsInstitution> institutions=tsInstitutionService.getInstitutionAndUser();
|
||||
public ResponseMessage<List<TsInstitution>> getInstitutionAndUser(String userName){
|
||||
List<TsInstitution> institutions=tsInstitutionService.getInstitutionAndUser(userName);
|
||||
return Result.success(institutions);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,19 @@ public class TsInstitutionController extends BaseController<TsInstitution> {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ApiOperation("获得下一级的部门和人员")
|
||||
@GetMapping("/getNext")
|
||||
public List<TsInstitution> getNext(String institutionId){
|
||||
return tsInstitutionService.getNext(institutionId);
|
||||
}
|
||||
|
||||
@ApiOperation("获得第一级部门目录")
|
||||
@GetMapping("/getFirstInstitution")
|
||||
public List<TsInstitution> getFirstInstitution(){
|
||||
return tsInstitutionService.getFirst();
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
// System.out.println(json);
|
||||
}
|
||||
|
||||
@@ -16,12 +16,26 @@ import java.util.List;
|
||||
* @since 2021-06-22
|
||||
*/
|
||||
public interface TsInstitutionDao extends BaseMapper<TsInstitution> {
|
||||
/**
|
||||
* 根据部门id查询此部门的子一级部门
|
||||
* @return
|
||||
*/
|
||||
List<TsInstitution> selectNextInstitution(String institutionId);
|
||||
|
||||
/**
|
||||
* 根据部门id查询此部门的子一级人员
|
||||
* @return
|
||||
*/
|
||||
List<TsInstitution> selectNextUser(String institutionId);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询最高级机构及其人员
|
||||
* @return List<TsInstitution>
|
||||
*/
|
||||
List<TsInstitution> selectRootAndUser();
|
||||
List<TsInstitution> selectRootAndUser(String userName);
|
||||
|
||||
/**
|
||||
* 根据父节点查询机构及其人员
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author zyl
|
||||
@@ -59,6 +59,11 @@ public class TsInstitution extends BaseEntity {
|
||||
@ApiModelProperty("是否有子节点(1有,0没有)")
|
||||
private String hasChild;
|
||||
|
||||
|
||||
@ApiModelProperty("用户")
|
||||
private TsUserVO tsUserVO;
|
||||
|
||||
|
||||
public TsInstitution() {
|
||||
}
|
||||
|
||||
|
||||
+14
-1
@@ -20,7 +20,7 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
||||
*/
|
||||
List<TsInstitution> getInstitution();
|
||||
|
||||
List<TsInstitution> getInstitutionAndUser();
|
||||
List<TsInstitution> getInstitutionAndUser(String userName);
|
||||
|
||||
/**
|
||||
* 批量插入机构
|
||||
@@ -29,4 +29,17 @@ public interface ITsInstitutionService extends IService<TsInstitution> {
|
||||
void batchInsert(List<TsInstitution> tsInstitutions);
|
||||
|
||||
public void parseInstitution() throws Exception;
|
||||
|
||||
/**
|
||||
* 通过部门id获取他的子一级部门和人员
|
||||
* @param institutionId
|
||||
* @return
|
||||
*/
|
||||
public List<TsInstitution> getNext(String institutionId);
|
||||
|
||||
/**
|
||||
* 获得第一级的部门
|
||||
* @return
|
||||
*/
|
||||
public List<TsInstitution> getFirst();
|
||||
}
|
||||
|
||||
+37
-4
@@ -46,6 +46,9 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
return institutionRoot;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 递归获取子机构
|
||||
* @param tsInstitution:父机构
|
||||
@@ -100,15 +103,19 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 查询所有机构
|
||||
* 查询时带有userName时以userName为条件查询
|
||||
* 没有时查询所有结果
|
||||
* 根据查询下一级
|
||||
*/
|
||||
@Override
|
||||
public List<TsInstitution> getInstitutionAndUser() {
|
||||
public List<TsInstitution> getInstitutionAndUser(String userName) {
|
||||
//查询第一层机构
|
||||
List<TsInstitution> institutionRoot=tsInstitutionDao.selectRootAndUser();
|
||||
List<TsInstitution> institutionRoot=tsInstitutionDao.selectRootAndUser(userName);
|
||||
|
||||
//把查到的数据结构修改,把用户放
|
||||
for(TsInstitution tsInstitution:institutionRoot){
|
||||
tsInstitution.setDisabled(true);
|
||||
tsInstitution.setChildren(recursionGetInstitutionAndUser(tsInstitution));
|
||||
tsInstitution.setChildren( recursionGetInstitutionAndUser(tsInstitution) );
|
||||
for(TsUserVO user:tsInstitution.getUsers()){
|
||||
if(tsInstitution.getChildren()==null){
|
||||
tsInstitution.setChildren(new ArrayList<>());
|
||||
@@ -145,6 +152,7 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
System.out.println(2);
|
||||
System.out.println(tsInstitution);
|
||||
List<Object> institutionObject=new ArrayList<>();
|
||||
//通过以此部门id作为父id查询它的子部门
|
||||
List<TsInstitution> tsInstitutions=tsInstitutionDao.selectAndUserByParent(tsInstitution.getId());
|
||||
|
||||
for(TsInstitution tsInstitutionNode:tsInstitutions){
|
||||
@@ -179,5 +187,30 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
batchInsert(tsInstitutions);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过部门id获得这个部门下的下一级部门
|
||||
* @return
|
||||
*/
|
||||
public List<TsInstitution> getNext(String institutionId){
|
||||
List<TsInstitution> tsInstitutions = tsInstitutionDao.selectNextInstitution(institutionId);
|
||||
List<TsInstitution> tsUsers=tsInstitutionDao.selectNextUser(institutionId);
|
||||
|
||||
|
||||
for(TsInstitution tsInstitution:tsInstitutions){
|
||||
tsInstitution.setDisabled(true);
|
||||
}
|
||||
tsInstitutions.addAll(tsUsers);
|
||||
return tsInstitutions;
|
||||
}
|
||||
|
||||
|
||||
public List<TsInstitution> getFirst(){
|
||||
//查询第一层机构
|
||||
List<TsInstitution> tsInstitutions = tsInstitutionDao.selectRootAndUser(null);
|
||||
for(TsInstitution tsInstitution:tsInstitutions){
|
||||
tsInstitution.setDisabled(true);
|
||||
}
|
||||
return tsInstitutions;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -80,4 +81,6 @@ public class LawsDto {
|
||||
@ExcelProperty(value = "卡车vpps中文名称", index = 13)
|
||||
@ApiModelProperty(value = "卡车vpps中文名称")
|
||||
private String KCCVPPSCN;
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
private String responsibleEngineer;
|
||||
}
|
||||
|
||||
+3
-3
@@ -135,7 +135,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<SarLawsDetailedList> AllSelectD(Integer pages, Integer size, String sortKey,
|
||||
public IPage<SarLawsDetailedList> AllSelectD(Integer page, Integer pageSize, String sortKey,
|
||||
String countryArea,String projectName,
|
||||
String detailedList,String detailedListName) {
|
||||
QueryWrapper<SarLawsDetailedList> wrapper = new QueryWrapper<>();
|
||||
@@ -151,8 +151,8 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
|
||||
like(StringUtils.isNotEmpty(detailedListName),"detailed_list_name",detailedListName);
|
||||
}
|
||||
wrapper.eq("sort_key",sortKey);
|
||||
Page<SarLawsDetailedList> page = new Page<>(pages, size);
|
||||
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(page, wrapper);
|
||||
Page<SarLawsDetailedList> pageRes = new Page<>(page, pageSize);
|
||||
IPage<SarLawsDetailedList> userIPage = sarLawsDetailedListDao.selectPage(pageRes, wrapper);
|
||||
if ("1".equals(sortKey)){
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
List<SarLawsDetailedList> list= userIPage.getRecords();
|
||||
|
||||
+10
-1
@@ -31,10 +31,19 @@ public class SarModelTreeController extends BaseController<SarModelTree> {
|
||||
@Autowired
|
||||
private ISarModelTreeService iSarModelTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarModelTree>> getAll(SarModelTree sarVppsTree){
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarModelTree>> childByList(String ids){
|
||||
SarModelTree tree = new SarModelTree();
|
||||
tree.setId(ids);
|
||||
List<SarModelTree> tsResources = iSarModelTreeService.recursionGetChildren(tree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarModelTree.service;
|
||||
|
||||
import com.adc.da.slrs.sarModelTree.entity.SarModelTree;
|
||||
import com.adc.da.slrs.sarVppsTree.entity.SarVppsTree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,4 +18,5 @@ public interface ISarModelTreeService extends IService<SarModelTree> {
|
||||
|
||||
List<SarModelTree> getAll(SarModelTree sarModelTree);
|
||||
|
||||
List<SarModelTree> recursionGetChildren(SarModelTree parent);
|
||||
}
|
||||
|
||||
+6
-5
@@ -29,9 +29,9 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
QueryWrapper<SarModelTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarModelTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarModelTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
// for(SarModelTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -40,10 +40,11 @@ public class SarModelTreeServiceImpl extends ServiceImpl<SarModelTreeDao, SarMod
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
@Override
|
||||
public List<SarModelTree> recursionGetChildren(SarModelTree parent){
|
||||
QueryWrapper<SarModelTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
List<SarModelTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarModelTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
|
||||
+23
@@ -51,6 +51,29 @@ public class SarUserStarServiceImpl extends ServiceImpl<SarUserStarDao, SarUserS
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public ResponseMessage<IPage<SarUserStar>> getUserStarList(PersonCollectEO personCollectEO) {
|
||||
// if (personCollectEO.getUserId() == null) {
|
||||
// return Result.error("userId不能为空");
|
||||
// } else {
|
||||
//
|
||||
// QueryWrapper<SarUserStar> wrapper = new QueryWrapper<>();
|
||||
// wrapper.eq("user_id", personCollectEO.getUserId());
|
||||
// if(personCollectEO.getCollectType()!=null)wrapper.like("COLLECT_TYPE",personCollectEO.getCollectType());
|
||||
// if(personCollectEO.getCollectTitle()!=null)wrapper.like("name",personCollectEO.getCollectTitle());
|
||||
// if(sarUserStarEO.getModular()!=null)wrapper.like("modular",sarUserStarEO.getModular());
|
||||
// if(sarUserStarEO.getInfo()!=null)wrapper.like("info",sarUserStarEO.getInfo());
|
||||
// if(sarUserStarEO.getUrl()!=null)wrapper.like("url",sarUserStarEO.getUrl());
|
||||
// IPage<SarUserStar> page = iSarUserStarService.page(new Page<>(sarUserStarEO.getCurrent(), sarUserStarEO.getSize()), wrapper);
|
||||
// while (page.getRecords().remove(null)) ;
|
||||
// return Result.success(page);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ResponseMessage<IPage<SarUserStar>> deleteList(@RequestBody SarUserStarEO sarUserStars) {
|
||||
if (sarUserStars.getUserId() == null) {
|
||||
|
||||
@@ -156,5 +156,9 @@ public class SarStandItems extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private SarCompStatusInfo pgForm;
|
||||
|
||||
//责任工程师
|
||||
private String responsibleEngineer;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class SarStandItemsDto {
|
||||
private String responsibleUnit;
|
||||
|
||||
|
||||
|
||||
private String responsibleEngineer;
|
||||
|
||||
|
||||
|
||||
|
||||
+8
-1
@@ -7,6 +7,7 @@ import com.adc.da.slrs.sarStandProjectLibrary.service.impl.SarStandProjectLibrar
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -87,7 +88,13 @@ public class SarStandProjectLibraryController extends BaseController<SarStandPro
|
||||
p.setSarStandProjectLibraries(list2);
|
||||
listTemp.add(p);
|
||||
}
|
||||
return Result.success("200",listTemp);
|
||||
IPage<productLineDto> pageres=new Page<>();
|
||||
pageres.setRecords(listTemp);
|
||||
pageres.setPages(list1.getPages());
|
||||
pageres.setTotal(list1.getTotal());
|
||||
pageres.setCurrent(list1.getCurrent());
|
||||
pageres.setSize(list1.getSize());
|
||||
return Result.success("200",pageres);
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
+14
@@ -34,7 +34,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -55,6 +57,18 @@ public class SarStandUnqualifiedController extends BaseController<SarStandUnqual
|
||||
@Autowired
|
||||
private ISarStandUnqualifiedService sarStandUnqualifiedService;
|
||||
|
||||
@ApiOperation("未符合项整改新增")
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage<Object> add(@RequestBody List<SarStandUnqualified> sarStandUnqualified){
|
||||
sarStandUnqualified.forEach(sarStandUnqualified1 -> sarStandUnqualified1.setCreateTime(new Date()));
|
||||
if (sarStandUnqualifiedService.saveBatch(sarStandUnqualified)) {
|
||||
return Result.success("新增成功");
|
||||
}
|
||||
else{
|
||||
return Result.error("新增失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询未符合项
|
||||
* @param sarStandUnqualifiedPage:筛选、分页信息
|
||||
|
||||
+5
@@ -1,7 +1,11 @@
|
||||
package com.adc.da.slrs.sarStandUnqualified.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualified;
|
||||
import com.adc.da.slrs.sarStandUnqualified.entity.SarStandUnqualifiedPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
@@ -14,6 +18,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
*/
|
||||
@Mapper
|
||||
public interface SarStandUnqualifiedDao extends BaseMapper<SarStandUnqualified> {
|
||||
IPage<SarStandUnqualified> getAllDatasByPage(Page page,@Param("sar") SarStandUnqualifiedPage sarStandUnqualified);
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
-4
@@ -3,11 +3,13 @@ package com.adc.da.slrs.sarStandUnqualified.entity;
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import com.adc.da.slrs.sarStandUnqualified.utils.ProductTypeConverter;
|
||||
import com.adc.da.slrs.sarStandUnqualified.utils.TimestampConverter;
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@@ -84,7 +86,7 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("CREATE_TIME")
|
||||
private Timestamp createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "关闭状态(1为开启,2为关闭)")
|
||||
@@ -96,14 +98,14 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("ACTUAL_CLOSE_TIME")
|
||||
private Timestamp actualCloseTime;
|
||||
private Date actualCloseTime;
|
||||
|
||||
@ExcelProperty(value = "计划关闭时间",converter = TimestampConverter.class)
|
||||
@ApiModelProperty(value = "计划关闭时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("PLAN_CLOSE_TIME")
|
||||
private Timestamp planCloseTime;
|
||||
private Date planCloseTime;
|
||||
|
||||
@ApiModelProperty(value = "未符合原因")
|
||||
@TableField("REASON")
|
||||
@@ -133,8 +135,18 @@ public class SarStandUnqualified extends BaseEntity {
|
||||
|
||||
@ExcelIgnore
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
@TableId(type = IdType.UUID)
|
||||
private String id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "质量工程师")
|
||||
private String qaEngineerName;
|
||||
|
||||
@ApiModelProperty(value = "认证工程师")
|
||||
private String authEngineerName;
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
private String dutyEngineerName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -46,4 +46,5 @@ public interface ISarStandUnqualifiedService extends IService<SarStandUnqualifie
|
||||
* @return List<SarStandUnqualified>
|
||||
*/
|
||||
List<SarStandUnqualified> getStandUnqualifiedExcelData(StandUnqualifiedExcelVO standUnqualifiedExcelVO);
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -144,4 +144,3 @@ public class SarStandUnqualifiedServiceImpl extends ServiceImpl<SarStandUnqualif
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-6
@@ -12,6 +12,7 @@ import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarInterpretat
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.service.ISarStandardComplianceProductAssessService;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -25,9 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -170,10 +169,14 @@ public class SarStandardComplianceAssessResultController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "插入标准涉及项目符合性清单")
|
||||
@PostMapping("/product")
|
||||
public ResponseMessage insertProduct(List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
@PostMapping("/add")
|
||||
public ResponseMessage insertProduct(@RequestBody List<SarStandardComplianceProductAssess> eo) throws Exception {
|
||||
|
||||
iSarStandardComplianceProductAssessService.saveOrUpdateBatch(eo);
|
||||
eo.forEach(sarStandardComplianceProductAssess -> {
|
||||
sarStandardComplianceProductAssess.setId(UUIDUtils.randomUUID(32));
|
||||
sarStandardComplianceProductAssess.setInterpretationTime(new Date());
|
||||
});
|
||||
iSarStandardComplianceProductAssessService.saveBatch(eo);
|
||||
|
||||
|
||||
return Result.success();
|
||||
|
||||
+2
@@ -109,4 +109,6 @@ public class SarStandardComplianceProductAssess extends BaseEntity {
|
||||
private Date interpretationTime;
|
||||
|
||||
|
||||
private String id;
|
||||
|
||||
}
|
||||
|
||||
@@ -51,8 +51,12 @@ public class TsUrlController{
|
||||
@ApiOperation(value="第三方链接-添加", notes="第三方链接-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public ResponseMessage<?> add(@RequestBody TsUrl tsUrl) {
|
||||
int orderBy=tsUrlService.getMaxOrderBy();
|
||||
tsUrl.setOrderBy(orderBy+1);
|
||||
String orderBy=tsUrlService.getMaxOrderBy();
|
||||
if (null!=orderBy) {
|
||||
tsUrl.setOrderBy(Integer.valueOf(orderBy) + 1);
|
||||
}else {
|
||||
tsUrl.setOrderBy(1);
|
||||
}
|
||||
tsUrlService.save(tsUrl);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ public interface TsUrlDao extends BaseMapper<TsUrl> {
|
||||
* @return int
|
||||
*/
|
||||
@Select("select max(order_by) from ts_url")
|
||||
int getMaxOrderBy();
|
||||
String getMaxOrderBy();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface ITsUrlService extends IService<TsUrl> {
|
||||
* 获取最大排序号
|
||||
* @return int
|
||||
*/
|
||||
int getMaxOrderBy();
|
||||
String getMaxOrderBy();
|
||||
|
||||
/**
|
||||
* 排序
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TsUrlServiceImpl extends ServiceImpl<TsUrlDao, TsUrl> implements IT
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int getMaxOrderBy() {
|
||||
public String getMaxOrderBy() {
|
||||
return tsUrlDao.getMaxOrderBy();
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -31,11 +31,22 @@ public class SarVppsTreeController extends BaseController<SarVppsTree> {
|
||||
@Autowired
|
||||
private ISarVppsTreeService iSarVppsTreeService;
|
||||
|
||||
@ApiOperation("查询所有资源")
|
||||
@ApiOperation("查询父所有资源")
|
||||
@GetMapping("/list")
|
||||
public ResponseMessage<List<SarVppsTree>> getAll(SarVppsTree sarVppsTree){
|
||||
List<SarVppsTree> tsResources = iSarVppsTreeService.getAll(sarVppsTree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
@ApiOperation("根据父ID查询子所有资源")
|
||||
@GetMapping("/childByList")
|
||||
public ResponseMessage<List<SarVppsTree>> childByList(String ids){
|
||||
SarVppsTree tree = new SarVppsTree();
|
||||
tree.setId(ids);
|
||||
List<SarVppsTree> tsResources = iSarVppsTreeService.recursionGetChildren(tree);
|
||||
return Result.success(tsResources);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,6 @@ import java.util.List;
|
||||
public interface ISarVppsTreeService extends IService<SarVppsTree> {
|
||||
|
||||
List<SarVppsTree> getAll(SarVppsTree sarVppsTree);
|
||||
|
||||
List<SarVppsTree> recursionGetChildren(SarVppsTree parent);
|
||||
}
|
||||
|
||||
+6
-5
@@ -29,9 +29,9 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
QueryWrapper<SarVppsTree> tsResourceQueryWrapper=new QueryWrapper<>();
|
||||
tsResourceQueryWrapper.isNull("PID");
|
||||
List<SarVppsTree> list = this.baseMapper.selectList(tsResourceQueryWrapper);
|
||||
for(SarVppsTree tree:list){
|
||||
tree.setChildren(recursionGetChildren((tree)));
|
||||
}
|
||||
// for(SarVppsTree tree:list){
|
||||
// tree.setChildren(recursionGetChildren((tree)));
|
||||
// }
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -40,10 +40,11 @@ public class SarVppsTreeServiceImpl extends ServiceImpl<SarVppsTreeDao, SarVppsT
|
||||
* @param parent:父节点
|
||||
* @return List<SarMenu>
|
||||
*/
|
||||
private List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
@Override
|
||||
public List<SarVppsTree> recursionGetChildren(SarVppsTree parent){
|
||||
QueryWrapper<SarVppsTree> sarMenuQueryWrapper=new QueryWrapper<>();
|
||||
sarMenuQueryWrapper.orderByAsc("SORT");
|
||||
sarMenuQueryWrapper.eq("PID",parent.getId());
|
||||
sarMenuQueryWrapper.in("PID",parent.getId());
|
||||
List<SarVppsTree> children=this.baseMapper.selectList(sarMenuQueryWrapper);
|
||||
for(SarVppsTree sarMenu:children){
|
||||
sarMenu.setChildren(recursionGetChildren((sarMenu)));
|
||||
|
||||
Reference in New Issue
Block a user