智慧保安后台管理-外网
Administrator
2021-11-30 388c0a460456c3ecd73f9bc62530a0fd162fa0c5
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -44,6 +44,8 @@
import org.springblade.modules.accreditation.service.AccreditationRecordsService;
import org.springblade.modules.auth.enums.UserEnum;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import org.springblade.modules.experience.entity.Experience;
import org.springblade.modules.experience.service.IExperienceService;
import org.springblade.modules.information.entity.Information;
import org.springblade.modules.information.service.IInformationService;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
@@ -89,7 +91,7 @@
   private final IInformationService iInformationService;
   private final IDeptService deptService;
   private final JurisdictionService jurisdictionService;
   private final AccreditationRecordsService accreditationRecordsService;
   private final IExperienceService experienceService;
   @Override
   @Transactional(rollbackFor = Exception.class)
@@ -901,6 +903,18 @@
               }
               //新增
               this.save(user);
               //从业记录新增
               Experience experience = new Experience();
               experience.setCardid(user.getCardid());
               experience.setSecurityid(user.getId().toString());
               experience.setCompanyname(userExcel.getDeptId());
               experience.setName(user.getRealName());
               experience.setPost("保安员");
               experience.setEntrytime(new Date());
               experienceService.save(experience);
               //内网同步
               String s = "insert into blade_user(" +
                  "id,tenant_id,account,password,name,real_name,avatar,email,phone,sex," +
@@ -935,7 +949,17 @@
                  "," + "'" + user.getExaminationType() + "'" +
                  "," + "'" + user.getStatus() + "'" +
                  "," + "'" + user.getIsDeleted() + "'" +
                  "," + "'" + user.getDispatch() + "'" + ")";
                  "," + "'" + user.getDispatch() + "'" + ");"+
               "insert into sys_experience(id,name,post,entryTime," +
                  "cardId,companyname,securityId) " +
                  "values(" + "'" + experience.getId() + "'" + "," +
                  "'" + experience.getName() + "'" + "," +
                  "'" + experience.getPost() + "'" + "," +
                  "," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience.getEntrytime()) + "'" +
                  "," + "'" + experience.getCardid() + "'" +
                  "," + "'" + experience.getCompanyname() + "'" +
                  "," + "'" + experience.getSecurityid() + "'"
                  + ")";
               FtpUtil.sqlFileUpload(s);
//            }else {
//               agetStatus.set(false);
@@ -1132,27 +1156,18 @@
            }
            //新增
            this.save(user);
            //从业记录新增
            Experience experience = new Experience();
            experience.setCardid(user.getCardid());
            experience.setSecurityid(user.getId().toString());
            experience.setCompanyname(userExcel.getDeptId());
            experience.setName(user.getRealName());
            experience.setPost("保安员");
            experience.setEntrytime(new Date());
            experienceService.save(experience);
            //内网同步
//            String s = "insert into blade_user(" +
//               "id,tenant_id,account,password,real_name,phone,sex,role_id,dept_id," +
//               "cardid,nation,registered,securitynumber,hold,status,is_deleted) " +
//               "values(" + "'" + user.getId() + "'" + "," +
//               "'" + user.getTenantId() + "'" + "," +
//               "'" + user.getAccount() + "'" + "," +
//               "'" + user.getPassword() + "'" + "," +
//               "'" + user.getRealName() + "'" + "," +
//               "'" + user.getPhone() + "'" + "," +
//               "'" + user.getSex() + "'" + "," +
//               "'" + user.getRoleId() + "'" +
//               "," + "'" + user.getDeptId() + "'" +
//               "," + "'" + user.getCardid() + "'" +
//               "," + "'" + user.getNation() + "'" +
//               "," + "'" + user.getRegistered() + "'" +
//               "," + "'" + user.getSecuritynumber() + "'" +
//               "," + "'" + user.getHold() + "'" +
//               "," + "'" + user.getStatus() + "'" +
//               "," + "'" + user.getIsDeleted() + "'"
//               + ")";
            String s = "insert into blade_user(" +
               "id,tenant_id,account,password,name,real_name,avatar,email,phone,sex," +
               "role_id,dept_id,cardid,nativePlace,nation,fingerprint,education," +
@@ -1187,7 +1202,17 @@
               "," + "'" + user.getStatus() + "'" +
               "," + "'" + user.getIsDeleted() + "'" +
               "," + "'" + user.getIsDeleted() + "'" +
               "," + "'" + user.getGuncode() + "'" + ")";
               "," + "'" + user.getGuncode() + "'" + ");"+
            "insert into sys_experience(id,name,post,entryTime," +
               "cardId,companyname,securityId) " +
               "values(" + "'" + experience.getId() + "'" + "," +
               "'" + experience.getName() + "'" + "," +
               "'" + experience.getPost() + "'" + "," +
               "," + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience.getEntrytime()) + "'" +
               "," + "'" + experience.getCardid() + "'" +
               "," + "'" + experience.getCompanyname() + "'" +
               "," + "'" + experience.getSecurityid() + "'"
               + ")";
            FtpUtil.sqlFileUpload(s);
         }
         else {