|
@@ -15,6 +15,7 @@ import com.sckj.iron.validate.TIronStepUpdateValidate;
|
|
import com.sckj.iron.vo.IronStepVO;
|
|
import com.sckj.iron.vo.IronStepVO;
|
|
import com.sckj.iron.vo.TIronStepDetailVo;
|
|
import com.sckj.iron.vo.TIronStepDetailVo;
|
|
import com.sckj.iron.vo.TIronStepListedVo;
|
|
import com.sckj.iron.vo.TIronStepListedVo;
|
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.Assert;
|
|
import org.springframework.util.Assert;
|
|
@@ -108,21 +109,58 @@ public class TIronStepServiceImpl extends ServiceImpl<TIronStepMapper, TIronStep
|
|
Integer limit = pageValidate.getPageSize();
|
|
Integer limit = pageValidate.getPageSize();
|
|
|
|
|
|
QueryWrapper<TIronStep> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<TIronStep> queryWrapper = new QueryWrapper<>();
|
|
- queryWrapper.orderByDesc(Arrays.asList("sort", "identifier"));
|
|
|
|
-
|
|
|
|
- tIronStepMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
|
|
|
- "=:stepId@step_id:str",
|
|
|
|
- "=:required:str",
|
|
|
|
- "=:identifier:str",
|
|
|
|
- "like:stepName@step_name:str",
|
|
|
|
- "=:stepNameExpression@step_name_expression:str",
|
|
|
|
- "=:stepCondition@step_condition:str",
|
|
|
|
- "=:sort:int",
|
|
|
|
- "=:nodeType@node_type:str",
|
|
|
|
- "=:status:str",
|
|
|
|
- "=:confirmMode@confirm_mode:str",
|
|
|
|
- "like:pointName@point_name:str",
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getStepId())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getStepId, searchValidate.getStepId());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getRequired())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getRequired, searchValidate.getRequired());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getIdentifier())){
|
|
|
|
+ queryWrapper.lambda().like(TIronStep::getIdentifier, searchValidate.getIdentifier());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getStepName())){
|
|
|
|
+ queryWrapper.lambda().like(TIronStep::getStepName, searchValidate.getStepName());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getStepNameExpression())){
|
|
|
|
+ queryWrapper.lambda().like(TIronStep::getStepNameExpression, searchValidate.getStepNameExpression());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getStepCondition())){
|
|
|
|
+ queryWrapper.lambda().like(TIronStep::getStepCondition, searchValidate.getStepCondition());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getSort())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getSort, searchValidate.getSort());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getNodeType())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getNodeType, searchValidate.getNodeType());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getStatus())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getStatus, searchValidate.getStatus());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getConfirmMode())){
|
|
|
|
+ queryWrapper.lambda().eq(TIronStep::getConfirmMode, searchValidate.getConfirmMode());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtils.isNotEmpty(searchValidate.getPointName())){
|
|
|
|
+ queryWrapper.lambda().like(TIronStep::getPointName, searchValidate.getPointName());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ queryWrapper.orderByDesc(Arrays.asList("sort", "step_id"));
|
|
|
|
+
|
|
|
|
+// tIronStepMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
|
|
|
+// "=:stepId@step_id:str",
|
|
|
|
+// "=:required:str",
|
|
|
|
+// "like:identifier@identifier:str",
|
|
|
|
+// "like:stepName@step_name:str",
|
|
|
|
+// "like:stepNameExpression@step_name_expression:str",
|
|
|
|
+// "like:stepCondition@step_condition:str",
|
|
|
|
+// "=:sort:int",
|
|
|
|
+// "=:nodeType@node_type:str",
|
|
|
|
+// "=:status:str",
|
|
|
|
+// "=:confirmMode@confirm_mode:str",
|
|
|
|
+// "like:pointName@point_name:str",
|
|
|
|
+// });
|
|
|
|
+//
|
|
|
|
+
|
|
|
|
|
|
IPage<TIronStep> iPage = tIronStepMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
|
IPage<TIronStep> iPage = tIronStepMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
|
|
|
|
|
@@ -167,6 +205,7 @@ public class TIronStepServiceImpl extends ServiceImpl<TIronStepMapper, TIronStep
|
|
public void add(TIronStepCreateValidate createValidate) {
|
|
public void add(TIronStepCreateValidate createValidate) {
|
|
TIronStep model = new TIronStep();
|
|
TIronStep model = new TIronStep();
|
|
model.setStepId(createValidate.getStepId());
|
|
model.setStepId(createValidate.getStepId());
|
|
|
|
+ model.setIdentifier(createValidate.getIdentifier());
|
|
model.setRequired(createValidate.getRequired());
|
|
model.setRequired(createValidate.getRequired());
|
|
model.setStepName(createValidate.getStepName());
|
|
model.setStepName(createValidate.getStepName());
|
|
model.setStepNameExpression(createValidate.getStepNameExpression());
|
|
model.setStepNameExpression(createValidate.getStepNameExpression());
|
|
@@ -189,7 +228,7 @@ public class TIronStepServiceImpl extends ServiceImpl<TIronStepMapper, TIronStep
|
|
public void edit(TIronStepUpdateValidate updateValidate) {
|
|
public void edit(TIronStepUpdateValidate updateValidate) {
|
|
TIronStep model = tIronStepMapper.selectOne(
|
|
TIronStep model = tIronStepMapper.selectOne(
|
|
new QueryWrapper<TIronStep>()
|
|
new QueryWrapper<TIronStep>()
|
|
- .eq("identifier", updateValidate.getIdentifier())
|
|
|
|
|
|
+ .eq("step_id", updateValidate.getStepId())
|
|
.last("limit 1"));
|
|
.last("limit 1"));
|
|
|
|
|
|
Assert.notNull(model, "数据不存在!");
|
|
Assert.notNull(model, "数据不存在!");
|
|
@@ -215,10 +254,10 @@ public class TIronStepServiceImpl extends ServiceImpl<TIronStepMapper, TIronStep
|
|
* @param id 主键ID
|
|
* @param id 主键ID
|
|
*/
|
|
*/
|
|
|
|
|
|
- public void del(Integer id) {
|
|
|
|
|
|
+ public void del(String id) {
|
|
TIronStep model = tIronStepMapper.selectOne(
|
|
TIronStep model = tIronStepMapper.selectOne(
|
|
new QueryWrapper<TIronStep>()
|
|
new QueryWrapper<TIronStep>()
|
|
- .eq("identifier", id)
|
|
|
|
|
|
+ .eq("step_id", id)
|
|
.last("limit 1"));
|
|
.last("limit 1"));
|
|
|
|
|
|
Assert.notNull(model, "数据不存在!");
|
|
Assert.notNull(model, "数据不存在!");
|