| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName AttResBaseServiceImpl |
| | |
| | | public Boolean updateResBaseByGuid(AttResBase attResBase) { |
| | | attResBase.setUpdateTime(DateUtil.now()); |
| | | |
| | | String updateBy = baseMapper.getUpdateLog(attResBase.getGuid()); |
| | | if (StringUtil.isBlank(updateBy)){ |
| | | updateBy = ""; |
| | | } |
| | | BladeUser user = AuthUtil.getUser(); |
| | | //修改人基础信息 |
| | | String account = user.getAccount(); |
| | | String userName = user.getUserName(); |
| | | String nowTime = DateUtil.format(DateUtil.now(),DateUtil.PATTERN_DATETIME); |
| | | |
| | | String updateUser = StringUtil.format("[{}-{}-{}]",account,userName,nowTime); |
| | | |
| | | //修改的东西 |
| | | String interiorAdGuid = attResBase.getInteriorAdGuid(); |
| | | String label = attResBase.getLabel(); |
| | | String heightBaseStdTp = attResBase.getHeightBaseStdTp(); |
| | | String isGate = attResBase.getIsGate(); |
| | | |
| | | String updateLog = ""; |
| | | List<String> strList = new ArrayList<>(); |
| | | if (StringUtil.isNotBlank(interiorAdGuid)){ |
| | | strList.add("行政区划修改为"+ interiorAdGuid); |
| | | } |
| | | strList.add("标签修改为"+label); |
| | | strList.add("高程基准面修改为"+heightBaseStdTp); |
| | | strList.add("是否有闸修改为"+isGate); |
| | | |
| | | String updateContent = String.join("、",strList); |
| | | |
| | | updateLog = updateUser + updateContent + ";"; |
| | | updateBy = updateBy + updateLog; |
| | | //向水库标签表中更新数据 |
| | | relResLabelService.updateEntity(attResBase.getGuid(),attResBase.getLabel()); |
| | | |
| | | //向操作记录表中增加记录 |
| | | baseMapper.updateRelResUpdateLoc(attResBase.getGuid(),updateBy); |
| | | return baseMapper.updateResBaseByGuid(attResBase); |
| | | } |
| | | |