企业清单
This commit is contained in:
parent
2ec4d52a3a
commit
e930fdbb6c
|
|
@ -2,6 +2,7 @@ package com.rzyc.mapper.ent;
|
||||||
|
|
||||||
import com.rzyc.model.ent.InListItem;
|
import com.rzyc.model.ent.InListItem;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -19,4 +20,7 @@ public interface InListItemMapper extends BaseMapper<InListItem> {
|
||||||
|
|
||||||
List<String> SelectContents();
|
List<String> SelectContents();
|
||||||
|
|
||||||
|
/*通过行业查询清单信息*/
|
||||||
|
List<InListItem> findByIndustryId(@Param("industryId") String industryId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,11 @@ item_basis, item_proof, item_law, sort_id, del_state,create_time, create_by, mod
|
||||||
select item_content from in_list_item;
|
select item_content from in_list_item;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--通过行业查询清单信息-->
|
||||||
|
<select id="findByIndustryId" resultMap="BaseResultMap">
|
||||||
|
SELECT ii.* FROM `in_list_item` ii
|
||||||
|
WHERE (ii.`industry_id` = #{industryId} OR ii.industry_id = '' OR ii.industry_id IS NULL)
|
||||||
|
ORDER BY ii.`list_id` ASC,ii.`sort_id` ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<!--查询清单列-->
|
<!--查询清单列-->
|
||||||
<select id="findAll" resultMap="BaseResultMap">
|
<select id="findAll" resultMap="BaseResultMap">
|
||||||
select * from in_list
|
select * from in_list il order by il.sort_id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import com.rzyc.model.check.BookEntHT;
|
||||||
import com.rzyc.model.check.ChkPerson;
|
import com.rzyc.model.check.ChkPerson;
|
||||||
import com.rzyc.model.ent.*;
|
import com.rzyc.model.ent.*;
|
||||||
import com.rzyc.model.user.*;
|
import com.rzyc.model.user.*;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
|
|
@ -464,6 +465,13 @@ public class BaseController {
|
||||||
//任务记录
|
//任务记录
|
||||||
@Autowired
|
@Autowired
|
||||||
protected TaskRecordMapper taskRecordMapper;
|
protected TaskRecordMapper taskRecordMapper;
|
||||||
|
|
||||||
|
//企业清单
|
||||||
|
@Autowired
|
||||||
|
protected InEntListMapper inEntListMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位不需要的字符串
|
* 岗位不需要的字符串
|
||||||
*/
|
*/
|
||||||
|
|
@ -3503,4 +3511,50 @@ public class BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业新增的时候 统一处理企业的清单信息
|
||||||
|
* 从行业清单获取行业下的清单 分配到企业清单
|
||||||
|
* 后期使用异步方式调用
|
||||||
|
*
|
||||||
|
* @version v1.0
|
||||||
|
* @author dong
|
||||||
|
* @date 2022/11/10 16:31
|
||||||
|
*/
|
||||||
|
public void handleEntList(String entId)throws Exception{
|
||||||
|
SysEnterprise enterprise = sysEnterpriseMapper.selectByPrimaryKey(entId);
|
||||||
|
if(null != enterprise){
|
||||||
|
|
||||||
|
//如果企业没有清单,则生成清单
|
||||||
|
List<InEntList> entLists = inEntListMapper.selectByEnterpriseId(entId);
|
||||||
|
if(null == entLists || entLists.size() == 0){
|
||||||
|
List<InListItem> listItems = inListItemMapper.findByIndustryId(enterprise.getWorkClassId());
|
||||||
|
if(null != listItems && listItems.size() > 0){
|
||||||
|
|
||||||
|
for (InListItem listItem : listItems){
|
||||||
|
InEntList entList = new InEntList();
|
||||||
|
entList.setEntListId(RandomNumber.getUUid());
|
||||||
|
entList.setItemId(listItem.getItemId());
|
||||||
|
entList.setListId(listItem.getListId());
|
||||||
|
entList.setEnterpriseId(entId);
|
||||||
|
entList.setItemTitle(listItem.getItemTitle());
|
||||||
|
entList.setItemContent(listItem.getItemContent());
|
||||||
|
entList.setStandard(listItem.getStandard());
|
||||||
|
entList.setFrequency(listItem.getFrequency());
|
||||||
|
entList.setEnclosure(listItem.getEnclosure());
|
||||||
|
entList.setItemBasis(listItem.getItemBasis());
|
||||||
|
entList.setItemProof(listItem.getItemProof());
|
||||||
|
entList.setItemLaw(listItem.getItemLaw());
|
||||||
|
entList.setSortId(listItem.getSortId());
|
||||||
|
entList.setDelState(listItem.getDelState());
|
||||||
|
entList.setCreateTime(new Date());
|
||||||
|
entList.setModifyTime(new Date());
|
||||||
|
entList.setCreateBy("");
|
||||||
|
entList.setModifyBy("");
|
||||||
|
inEntListMapper.insert(entList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -602,7 +602,8 @@ public class PcCompanyController extends com.rzyc.controller.BaseController {
|
||||||
//创建或者修改企业用户
|
//创建或者修改企业用户
|
||||||
createEntUser(sysEnterprise,sysUser.getChinaname(),sysUser);
|
createEntUser(sysEnterprise,sysUser.getChinaname(),sysUser);
|
||||||
|
|
||||||
|
//生成清单
|
||||||
|
handleEntList(sysEnterprise.getSysenterpriseid());
|
||||||
|
|
||||||
return singleResult;
|
return singleResult;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user