|
|
|
@ -12,13 +12,12 @@ import com.xujie.modules.base.dao.PropertiesMapper; |
|
|
|
import com.xujie.modules.base.data.*; |
|
|
|
import com.xujie.modules.base.entity.*; |
|
|
|
|
|
|
|
import com.xujie.modules.base.service.PropertiesGroupService; |
|
|
|
|
|
|
|
import com.xujie.modules.base.service.PropertiesService; |
|
|
|
|
|
|
|
|
|
|
|
import com.xujie.modules.sys.dao.SysUserDao; |
|
|
|
import com.xujie.modules.sys.entity.DictData; |
|
|
|
import com.xujie.modules.sys.entity.SysMenuEntity; |
|
|
|
import com.xujie.modules.sys.entity.SysUserEntity; |
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@ -37,8 +36,7 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
@Autowired |
|
|
|
private PropertiesMapper propertiesMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PropertiesGroupService propertiesGroupService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -175,39 +173,21 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
throw new RuntimeException("该模板编码已存在!"); |
|
|
|
} |
|
|
|
propertiesMapper.plmPropertiesModelSave(inData); |
|
|
|
PropertiesGroup group = new PropertiesGroup(); |
|
|
|
group.setSite(inData.getSite()); |
|
|
|
group.setMenuId(inData.getGroup()); |
|
|
|
group.setFunctionType(inData.getFunctionType()); |
|
|
|
group.setCodeNo(inData.getCodeNo());; |
|
|
|
group.setFunctionGroup(inData.getFunctionGroup()); |
|
|
|
propertiesGroupService.save(group); |
|
|
|
|
|
|
|
} |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void propertiesModelEdit(PlmPropertiesModelHeaderData inData){ |
|
|
|
propertiesGroupService.lambdaUpdate() |
|
|
|
.eq(PropertiesGroup::getSite,inData.getSite()) |
|
|
|
.eq(PropertiesGroup::getFunctionType,inData.getFunctionType()) |
|
|
|
.eq(PropertiesGroup::getCodeNo,inData.getCodeNo()).remove(); |
|
|
|
|
|
|
|
propertiesMapper.plmPropertiesModelEdit(inData); |
|
|
|
PropertiesGroup group = new PropertiesGroup(); |
|
|
|
group.setSite(inData.getSite()); |
|
|
|
group.setMenuId(inData.getGroup()); |
|
|
|
group.setFunctionType(inData.getFunctionType()); |
|
|
|
group.setCodeNo(inData.getCodeNo()); |
|
|
|
group.setFunctionGroup(inData.getFunctionGroup()); |
|
|
|
propertiesGroupService.save(group); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void propertiesModelDelete(PlmPropertiesModelHeaderData inData){ |
|
|
|
propertiesMapper.plmPropertiesModelDelete(inData); |
|
|
|
propertiesGroupService.lambdaUpdate() |
|
|
|
.eq(PropertiesGroup::getSite,inData.getSite()) |
|
|
|
.eq(PropertiesGroup::getFunctionType,inData.getFunctionType()) |
|
|
|
.eq(PropertiesGroup::getCodeNo,inData.getCodeNo()).remove(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -266,14 +246,6 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
return propertiesMapper.getModelItemLists(inData); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PlmPropertiesItemData> getItemListsForPartAndCode(PlmPropertiesModelHeaderData inData){ |
|
|
|
return propertiesMapper.getItemListsForPartAndCode(inData); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void goUpItem(PlmPropertiesModelDetail inData){ |
|
|
|
@ -303,16 +275,6 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public List<SysMenuEntity> searchMenuAllListId(PlmPropertiesModelHeader properties) { |
|
|
|
return propertiesMapper.searchMenuAllListId(properties.getSite()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Bu> searchBUList(PlmPropertiesModelHeader properties) { |
|
|
|
return propertiesMapper.searchBUList(properties.getSite()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<DictData> searchAllItemTypeList(PlmPropertiesItem propertiesItem) { |
|
|
|
return propertiesMapper.searchAllItemTypeList(propertiesItem); |
|
|
|
@ -324,11 +286,10 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Map<String, Object>> searchAllTypeRelationshipList(String functionType) { |
|
|
|
return propertiesMapper.searchAllTypeRelationshipList(functionType); |
|
|
|
public List<PlmPropertiesItemData> getItemListsForPartAndCode(PlmPropertiesModelHeaderData inData){ |
|
|
|
return propertiesMapper.getItemListsForPartAndCode(inData); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void refreshPropertiesModal(PartSubPropertiesValueData inData){ |
|
|
|
@ -340,8 +301,8 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
params.add(inData.getCodeNo()); |
|
|
|
List<Map<String, Object>> resultList = null; |
|
|
|
|
|
|
|
//执行方法 |
|
|
|
resultList = procedureDao.getProcedureData("plm_refreshPartSubPropertiesValue", params); |
|
|
|
//执行方法 |
|
|
|
resultList = procedureDao.getProcedureData("plm_refreshPartSubPropertiesValue", params); |
|
|
|
|
|
|
|
//判断是否成功 |
|
|
|
String code = String.valueOf(resultList.get(0).get("resultCode")); |
|
|
|
@ -353,7 +314,7 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public void saveSubPropertiesValueForAlone(List<PartSubPropertiesValueData> inData){ |
|
|
|
public void saveSubPropertiesValueForAlone(List<PartSubPropertiesValueData> inData){ |
|
|
|
for (int i = 0; i <inData.size() ; i++) { |
|
|
|
Double seqNo=propertiesMapper.getNewSeqNoForAlone(inData.get(i)); |
|
|
|
inData.get(i).setItemNo(seqNo); |
|
|
|
|