Merge branch 'develop_3' into 'develop_master'
Develop 3 feat: 提交 更新 自定义实体 See merge request !6
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ import com.adc.da.base.web.BaseController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandAttrInfo|")
|
||||
@RequestMapping("/SarStandAttrInfo/sar-stand-attr-info")
|
||||
@RequestMapping("/${restPath}/SarStandAttrInfo/sar-stand-attr-info")
|
||||
public class SarStandAttrInfoController extends BaseController<SarStandAttrInfo> {
|
||||
|
||||
}
|
||||
|
||||
+42
-81
@@ -13,11 +13,11 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-06-01
|
||||
* @since 2021-06-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -48,60 +48,32 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "归口管理部门")
|
||||
@TableField("GKDW")
|
||||
private String gkdw;
|
||||
|
||||
@ApiModelProperty(value = "起草单位")
|
||||
@TableField("FBJG")
|
||||
private String fbjg;
|
||||
|
||||
@ApiModelProperty(value = "我司参与深度")
|
||||
@TableField("CYSD")
|
||||
private String cysd;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期(标准文本)")
|
||||
@ApiModelProperty(value = "新车型实施日期(文本)")
|
||||
@TableField("XCXSSRQ")
|
||||
private String xcxssrq;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期(标准文本)")
|
||||
@ApiModelProperty(value = "在产车实施日期(文本)")
|
||||
@TableField("ZCCSSRQ")
|
||||
private String zccssrq;
|
||||
|
||||
@TableField("EOPSSRQ")
|
||||
private String eopssrq;
|
||||
|
||||
@ApiModelProperty(value = "采标编号")
|
||||
@TableField("CBBH")
|
||||
private String cbbh;
|
||||
|
||||
@ApiModelProperty(value = "适用车辆")
|
||||
@TableField("CLLX")
|
||||
private String cllx;
|
||||
|
||||
@ApiModelProperty(value = "标签")
|
||||
@TableField("GXHBQ")
|
||||
private String gxhbq;
|
||||
|
||||
@TableField("XGBM")
|
||||
private String xgbm;
|
||||
|
||||
@ApiModelProperty(value = "中国认证类型")
|
||||
@TableField("ZGRZLX")
|
||||
private String zgrzlx;
|
||||
|
||||
@TableField("GZZXX")
|
||||
private String gzzxx;
|
||||
|
||||
@TableField("FO")
|
||||
private String fo;
|
||||
|
||||
@TableField("XMPGJS")
|
||||
private String xmpgjs;
|
||||
|
||||
@TableField("SVPPS")
|
||||
private String svpps;
|
||||
|
||||
@ApiModelProperty(value = "草案")
|
||||
@TableField("CA")
|
||||
private String ca;
|
||||
@@ -118,13 +90,15 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("BPG")
|
||||
private String bpg;
|
||||
|
||||
@ApiModelProperty(value = "采购部门")
|
||||
@TableField("CGBM")
|
||||
private String cgbm;
|
||||
|
||||
@ApiModelProperty(value = "发布稿")
|
||||
@ApiModelProperty(value = "发布稿(必读)")
|
||||
@TableField("FBGBJBD")
|
||||
private String fbgbjbd;
|
||||
|
||||
@ApiModelProperty(value = "增补件(必读)")
|
||||
@TableField("ZBJBD")
|
||||
private String zbjbd;
|
||||
|
||||
@@ -132,10 +106,11 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("ZRBM")
|
||||
private String zrbm;
|
||||
|
||||
@ApiModelProperty(value = "法规维护人")
|
||||
@TableField("FGWHR")
|
||||
private String fgwhr;
|
||||
|
||||
@ApiModelProperty(value = "代替标准编号")
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@TableField("DTBJH")
|
||||
private String dtbjh;
|
||||
|
||||
@@ -168,37 +143,9 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("CBCD")
|
||||
private String cbcd;
|
||||
|
||||
@TableField("ZRLX")
|
||||
private String zrlx;
|
||||
|
||||
@TableField("YQLX")
|
||||
private String yqlx;
|
||||
|
||||
@TableField("XXZLXX")
|
||||
private String xxzlxx;
|
||||
|
||||
@TableField("NRDBZFGQD")
|
||||
private String nrdbzfgqd;
|
||||
|
||||
@TableField("FGXXSXXX")
|
||||
private String fgxxsxxx;
|
||||
|
||||
@TableField("DXBZ")
|
||||
private String dxbz;
|
||||
|
||||
@TableField("BDTBZBH")
|
||||
private String bdtbzbh;
|
||||
|
||||
// 新添加字段 --start
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期(国际)")
|
||||
@TableField("XCXSSRQGJ")
|
||||
private String xcxssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期(国际)")
|
||||
@TableField("ZCCSSRQGJ")
|
||||
private String zccssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "实施日期(标准文本)")
|
||||
@TableField("SSRQ")
|
||||
private String ssrq;
|
||||
@@ -207,6 +154,14 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("SSRQGJ")
|
||||
private String ssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "新车型实施日期(国家)")
|
||||
@TableField("XCXSSRQGJ")
|
||||
private String xcxssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "在产车实施日期(国家)")
|
||||
@TableField("ZCCSSRQGJ")
|
||||
private String zccssrqgj;
|
||||
|
||||
@ApiModelProperty(value = "修改单")
|
||||
@TableField("XGD")
|
||||
private String xgd;
|
||||
@@ -215,6 +170,10 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("JDWJ")
|
||||
private String jdwj;
|
||||
|
||||
@ApiModelProperty(value = "关联文件")
|
||||
@TableField("GLWJ")
|
||||
private String glwj;
|
||||
|
||||
@ApiModelProperty(value = "我司署名人")
|
||||
@TableField("WSSMR")
|
||||
private String wssmr;
|
||||
@@ -228,26 +187,18 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
private String sycpx;
|
||||
|
||||
@ApiModelProperty(value = "适用认证")
|
||||
@TableField("SYRZ")
|
||||
private String syrz;
|
||||
@TableField("SYZD")
|
||||
private String syzd;
|
||||
|
||||
@ApiModelProperty(value = "责任工程师")
|
||||
@TableField("ZRGCS")
|
||||
private String zrgcs;
|
||||
|
||||
@ApiModelProperty(value = "乘用车VPPS编码")
|
||||
@TableField("CYCVPPSBM")
|
||||
private String cycvppsbm;
|
||||
|
||||
@ApiModelProperty(value = "乘用车VPPS中文名称")
|
||||
@TableField("CYCVPPSCN")
|
||||
private String cycvppscn;
|
||||
|
||||
@ApiModelProperty(value = "卡车VPPS编码")
|
||||
@ApiModelProperty(value = "关联模块--卡车VPPS编码")
|
||||
@TableField("KCCVPPSBM")
|
||||
private String kccvppsbm;
|
||||
|
||||
@ApiModelProperty(value = "卡车VPPS中文名称")
|
||||
@ApiModelProperty(value = "关联模块--卡车vpps中文名称")
|
||||
@TableField("KCCVPPSCN")
|
||||
private String kccvppscn;
|
||||
|
||||
@@ -259,11 +210,21 @@ public class SarStandAttrInfo extends BaseEntity {
|
||||
@TableField("DYMC")
|
||||
private String dymc;
|
||||
|
||||
@ApiModelProperty(value = "关联文件")
|
||||
@TableField("GLWJ")
|
||||
private String glwj;
|
||||
@ApiModelProperty(value = "关联模块--乘用车VPPS编码")
|
||||
@TableField("CYCVPPSBM")
|
||||
private String cycvppsbm;
|
||||
|
||||
// -- end
|
||||
@ApiModelProperty(value = "关联模块--乘用车vpps中文名称")
|
||||
@TableField("CYCVPPSCN")
|
||||
private String cycvppscn;
|
||||
|
||||
@ApiModelProperty(value = "勘误件")
|
||||
@TableField("KWJ")
|
||||
private String kwj;
|
||||
|
||||
@ApiModelProperty(value = "体系类别")
|
||||
@TableField("TXLB")
|
||||
private String txlb;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+58
-1
@@ -1,12 +1,25 @@
|
||||
package com.adc.da.slrs.sarStandMenu.controller;
|
||||
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.slrs.sarMenu.entity.SarMenu;
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -17,7 +30,51 @@ import com.adc.da.base.web.BaseController;
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandMenu|")
|
||||
@RequestMapping("/SarStandMenu/sar-stand-menu")
|
||||
@RequestMapping("/${restPath}/lawss/sarStandMenu")
|
||||
public class SarStandMenuController extends BaseController<SarStandMenu> {
|
||||
|
||||
@Autowired
|
||||
private ISarStandMenuService sarStandMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuService sarMenuEOService;
|
||||
|
||||
@ApiOperation(value = "|SarStandMenuEO|修改")
|
||||
@PutMapping("/removeStandInfo")
|
||||
// @RequiresPermissions("lawss:sarStandMenu:update")
|
||||
public ResponseMessage update(@RequestBody SarStandMenu standardsInfoEO) throws Exception {
|
||||
String[] idList = standardsInfoEO.getIdlist();
|
||||
int count = 0;
|
||||
if(idList != null){
|
||||
for(String id : idList){
|
||||
SarStandMenu menuEO = new SarStandMenu();
|
||||
menuEO.setStandId(id);
|
||||
menuEO.setMenuId(standardsInfoEO.getMenuId());
|
||||
//删除所选目录下关联
|
||||
String oldMenuId = standardsInfoEO.getOldMenuId();
|
||||
if (StringUtils.isEmpty(oldMenuId)) {
|
||||
oldMenuId = standardsInfoEO.getMenuId();
|
||||
}
|
||||
menuEO.setOldMenuId(oldMenuId);
|
||||
count += sarStandMenuEOService.deleteByMenuId(menuEO);
|
||||
//查询是否还有与其他节点的关联,若没有则增加与根节点的关联
|
||||
List<SarStandMenu> getList = sarStandMenuEOService.selectAllMenuByStandId(menuEO);
|
||||
if (getList == null || getList.isEmpty()) {
|
||||
// 查询根节点
|
||||
SarMenu sarMenuEO = new SarMenu();
|
||||
sarMenuEO.setSorDivide(standardsInfoEO.getStandType() + "_STAND");
|
||||
List<SarMenu> getRootMenu = sarMenuEOService.queryMenuByDis(sarMenuEO);
|
||||
menuEO.setMenuId(getRootMenu.get(0).getId());
|
||||
menuEO.setId(UUIDUtils.randomUUID20());
|
||||
menuEO.setValidFlag(0);
|
||||
sarStandMenuEOService.saveOrUpdate(menuEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count>0){
|
||||
return Result.success("0","移除成功!",true);
|
||||
} else {
|
||||
return Result.error("移除失败!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,9 @@ public interface SarStandMenuDao extends BaseMapper<SarStandMenu> {
|
||||
int updateByStandIdAndMenuId(SarStandMenu sarStandMenuEO);
|
||||
|
||||
int deleteByStandIdAndMenuId(SarStandMenu sarStandMenuEO);
|
||||
|
||||
int deleteByMenuId (SarStandMenu sarStandMenuEO);
|
||||
|
||||
List<SarStandMenu> selectAllMenuByStandId(SarStandMenu sarStandMenuEO);
|
||||
|
||||
}
|
||||
|
||||
+6
@@ -3,6 +3,8 @@ package com.adc.da.slrs.sarStandMenu.service;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -13,4 +15,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
*/
|
||||
public interface ISarStandMenuService extends IService<SarStandMenu> {
|
||||
|
||||
int deleteByMenuId (SarStandMenu sarStandMenuEO);
|
||||
|
||||
List<SarStandMenu> selectAllMenuByStandId(SarStandMenu sarStandMenuEO);
|
||||
|
||||
}
|
||||
|
||||
+22
@@ -1,11 +1,15 @@
|
||||
package com.adc.da.slrs.sarStandMenu.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarMenu.service.ISarMenuService;
|
||||
import com.adc.da.slrs.sarStandMenu.entity.SarStandMenu;
|
||||
import com.adc.da.slrs.sarStandMenu.dao.SarStandMenuDao;
|
||||
import com.adc.da.slrs.sarStandMenu.service.ISarStandMenuService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -17,4 +21,22 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class SarStandMenuServiceImpl extends ServiceImpl<SarStandMenuDao, SarStandMenu> implements ISarStandMenuService {
|
||||
|
||||
@Autowired
|
||||
private SarStandMenuDao dao;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuService sarMenuEOService;
|
||||
|
||||
@Override
|
||||
public int deleteByMenuId (SarStandMenu sarStandMenuEO){
|
||||
List<String> menuIds = sarMenuEOService.getChildMenuList(sarStandMenuEO.getOldMenuId());
|
||||
sarStandMenuEO.setMenuIds(menuIds);
|
||||
return dao.deleteByMenuId(sarStandMenuEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarStandMenu> selectAllMenuByStandId(SarStandMenu sarStandMenuEO){
|
||||
return dao.selectAllMenuByStandId(sarStandMenuEO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,4 +68,19 @@
|
||||
where stand_id = #{standId, jdbcType=VARCHAR} and MENU_ID = #{menuId, jdbcType=VARCHAR}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMenuId" parameterType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
|
||||
delete from SAR_STAND_MENU
|
||||
where stand_id = #{standId}
|
||||
and MENU_ID in
|
||||
<foreach collection="menuIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectAllMenuByStandId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
|
||||
select <include refid="Base_Column_List" />
|
||||
from SAR_STAND_MENU
|
||||
where stand_id = #{standId} and valid_flag=0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user