Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/SmPwdStrategyQueryServiceImpl.java
@@ -9,6 +9,7 @@
import com.vci.model.SmPasswordStrategyForPlatform1;
import com.vci.omd.utils.ObjectTool;
import com.vci.pagemodel.SmPasswordStrategyVO;
import com.vci.starter.web.enumpck.VciFieldTypeEnum;
import com.vci.starter.web.util.BeanUtilForVCI;
import com.vci.web.service.SmUserQueryServiceI;
import com.vci.starter.web.constant.QueryOptionConstant;
@@ -31,6 +32,8 @@
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@@ -93,7 +96,7 @@
     * @return
     */
    @Override
    public DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws PLException {
    public DataGrid<SmPasswordStrategyVO> refDataGrid(Map<String, String> conditionMap, PageHelper pageHelper) throws Exception {
        if(pageHelper == null){
            pageHelper = new PageHelper(-1);
        }
@@ -138,13 +141,13 @@
     * @param smPasswordStrategyForPlatform1s 原平台的密码策略
     * @return
     */
    private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s) throws PLException{
    private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s) throws Exception{
        List<SmPasswordStrategyVO> smPasswordStrategyVOList = new ArrayList<>();
        if(!CollectionUtils.isEmpty(smPasswordStrategyForPlatform1s)){
            smPasswordStrategyForPlatform1s.stream().forEach(s -> {
                try {
                    smPasswordStrategyVOList.add(pltPwdStrategy2SmPwdStrategyVO(s));
                } catch (PLException e) {
                } catch (Exception e) {
                    e.printStackTrace();
                    String exceptionMessage = "Platform1对象转VO对象时出现错误,原因:"+VciBaseUtil.getExceptionMessage(e);
                    logger.error(exceptionMessage);
@@ -160,7 +163,7 @@
     * @param strategyForPlatform1 原平台的密码策略
     * @return 新的密码策略对象
     */
    private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1) throws PLException {
    private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1) throws PLException, ParseException {
        SmPasswordStrategyVO strategyVO = new SmPasswordStrategyVO();
        strategyVO.setOid(strategyForPlatform1.getPluid());
        strategyVO.setId("");
@@ -173,9 +176,14 @@
        strategyVO.setLockTime(strategyForPlatform1.getPlocktime());
        strategyVO.setDefaultFlag(strategyForPlatform1.getPlisdefault() == 1);
        strategyVO.setDescription(strategyForPlatform1.getPldesc());
        strategyVO.setCreateTime(new Date(strategyForPlatform1.getPlcreatetime()));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        if(Func.isNotEmpty(strategyForPlatform1.getPlcreatetime())){
            strategyVO.setCreateTime(sdf.parse(strategyForPlatform1.getPlcreatetime()));
        }
        strategyVO.setCreator(strategyForPlatform1.getPlcreateuser());
        strategyVO.setLastModifyTime(new Date(strategyForPlatform1.getPlupdatetime()));
        if(Func.isNotEmpty(strategyForPlatform1.getPlupdatetime())){
            strategyVO.setLastModifyTime(sdf.parse(strategyForPlatform1.getPlupdatetime()));
        }
        strategyVO.setLastModifier(strategyForPlatform1.getPlupdateuser());
        strategyVO.setLicensors(strategyForPlatform1.getPllicensors());
        strategyVO.setRequireCharCount(strategyForPlatform1.getPlrequiredtype());
@@ -316,7 +324,7 @@
     * @param conditionMap
     * @return
     */
    private List<SmPasswordStrategyVO> getPwdStrategyByCondition(Map<String,String> conditionMap) throws PLException {
    private List<SmPasswordStrategyVO> getPwdStrategyByCondition(Map<String,String> conditionMap) throws Exception {
        if(Func.isEmpty(conditionMap)){
            conditionMap = new HashMap();
        }
@@ -334,7 +342,7 @@
     * @return
     */
    @Override
    public boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException {
    public boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception {
        VciBaseUtil.alertNotNull(
                spsDto,"新增的密码策略对象",
                spsDto.getName(),"策略名称",
@@ -376,7 +384,7 @@
     * @return
     */
    @Override
    public boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException {
    public boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws Exception {
        VciBaseUtil.alertNotNull(
                spsDto,"新增的密码策略对象",
                spsDto.getOid(),"策略主键",