车型项目库的清单版本~~

This commit is contained in:
Mr.Z
2021-09-02 17:29:19 +08:00
parent 7d0c3a3a9a
commit 0e8238267c
5 changed files with 25 additions and 3 deletions
@@ -26,5 +26,6 @@ public interface SarStandProjectLibraryDao extends BaseMapper<SarStandProjectLib
Integer selectCountWorkFlow(@Param("qu") SarStandProjectLibrary sar,@Param("flag")int flag);
List<String> getAllStands();
List<String> getAllStand();
List<SarStandProjectLibrary> updateByProjectId(@Param("id")String id, @Param("version")String version);
void deleteByProjectId(@Param("projectId")String projectId);
}
@@ -72,6 +72,9 @@ public class SarStandProjectLibrary extends BaseEntity {
@TableField(exist = false)
private String uName;
@TableField("detailed_list_version")
private String detailedListVersion;
//标准编号
@TableField(exist = false)
@@ -39,4 +39,6 @@ public class SarStandProjectLibraryDto {
private String productLine;
private String detailedListVersion;
}
@@ -19,6 +19,7 @@ import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -40,6 +41,9 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
private SarStandAttrInfoDao sarStandAttrInfoDao;
@Resource
private IDicTypeEOService iDicTypeEOService;
Date version = new Date();
@Override
public IPage<SarStandProjectLibrary> queryMaintenanceProject(int current, int pageSize,
SarStandProjectLibraryDto sarDto) {
@@ -193,8 +197,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
@Override
public IPage<StandAttrInfoDto> queryStandInfo(int current, int pageSize, String standId, String cars) {
System.out.println(cars);
List<String> ids =new ArrayList<>();
//cars传回值为1时判断是从车型项目库中调取
if ("1".equals(cars)){
ids=sarStandProjectLibraryDao.getAllStand();
}
@@ -218,6 +222,7 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
System.out.println("总条数"+userIPage1.getTotal());
System.out.println("总页数"+userIPage1.getPages());
QueryWrapper<SarStandAttrInfo> wrapper2 = new QueryWrapper<>();
wrapper2.select("r.STAND_ID","SSRQ","XCXSSRQ","ZCCSSRQ","ZRBM","KCCVPPSBM","KCCVPPSCN","CYCVPPSBM","CYCVPPSCN");
if (ids.isEmpty()){
@@ -270,8 +275,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
@Override
public void batchInsert(List<StandProjectRelationDto> list) {
sarStandProjectLibraryDao.deleteByProjectId(list.get(0).getProjectId());
sarStandProjectLibraryDao.batchInsert(list);
sarStandProjectLibraryDao.deleteByProjectId(list.get(0).getProjectId());
sarStandProjectLibraryDao.batchInsert(list);
sarStandProjectLibraryDao.updateByProjectId(list.get(0).getProjectId(), String.valueOf(version));
}
@Override
@@ -32,6 +32,13 @@
project_id= #{projectId}
</delete>
<update id="updateByProjectId">
update sar_stand_project_library
<if test="id != null">
set detailed_list_version = #{version} where id = #{id}
</if>
</update>
<select id="selectCount" resultType="java.lang.Integer">
SELECT
count(sar_stand_project_library.id ) as total